Skip to content

Commit

Permalink
implement #356
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Sep 1, 2023
1 parent b834e56 commit bf334d4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inst/actions/zen4R_deposit_record.R
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ function(action, entity, config){
license <- licenses[[1]]$values[[1]]
accepted_licenses <- ZENODO$getLicenses()$id
if(license %in% accepted_licenses){
zenodo_metadata$setLicense(license)
zenodo_metadata$setLicense(license, sandbox = ZENODO$sandbox)
}else{
config$logger.warn(sprintf("Zenodo :license specified (%s) in entity doesn't match Zenodo accepted list of licenses. license %s ignored!",
license,license))
Expand Down Expand Up @@ -254,15 +254,15 @@ function(action, entity, config){
grants = entity$relations[sapply(entity$relations, function(x){tolower(x$key) == "grant"})]
if(length(grants)>0){
for(grant in grants){
zenodo_metadata$addGrant(grant)
zenodo_metadata$addGrant(grant, sandbox = ZENODO$sandbox)
}
}
}

#communities
if(length(communities)>0){
zenodo_metadata$metadata$communities <- list()
for(community in communities) zenodo_metadata$addCommunity(community)
for(community in communities) zenodo_metadata$addCommunity(community, sandbox = ZENODO$sandbox)
}
}else{
config$logger.info("Skipping update of Zenodo record metadata (option 'update_metadata' FALSE)")
Expand Down

0 comments on commit bf334d4

Please sign in to comment.