Skip to content

Commit

Permalink
enable grant support back with new zen4R
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Jun 4, 2024
1 parent 85316bf commit 1e38cbb
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions inst/actions/zen4R_deposit_record.R
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,14 @@ function(action, entity, config){
}

#grants
#TODO missing support in zen4R
# if(length(entity$relations)){
# grants = entity$relations[sapply(entity$relations, function(x){tolower(x$key) == "grant"})]
# if(length(grants)>0){
# for(grant in grants){
# zenodo_metadata$addGrant(grant, sandbox = ZENODO$sandbox)
# }
# }
# }
if(length(entity$relations)){
grants = entity$relations[sapply(entity$relations, function(x){tolower(x$key) == "grant"})]
if(length(grants)>0){
for(grant in grants){
zenodo_metadata$addGrant(grant, sandbox = ZENODO$sandbox)
}
}
}

}else{
config$logger.info("Skipping update of Zenodo record metadata (option 'update_metadata' FALSE)")
Expand Down

0 comments on commit 1e38cbb

Please sign in to comment.