Skip to content

Commit

Permalink
#133 getDepositionByConceptDOI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed May 14, 2024
1 parent 21618e8 commit 7f6515f
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions R/ZenodoManager.R
Original file line number Diff line number Diff line change
Expand Up @@ -982,15 +982,16 @@ ZenodoManager <- R6Class("ZenodoManager",
cli::cli_alert_info(infoMsg)
self$INFO(infoMsg)
conceptrec <- self$getDepositionByConceptId(conceptrecid)
last_doi <- tail(conceptrec$getVersions(),1L)$doi
if(length(last_doi)==0) {
if(nzchar(conceptrec$metadata$doi)){
last_doi = conceptrec$metadata$doi
}else{
last_doi = conceptrec$metadata$prereserve_doi$doi
}
}
result <- self$getDepositionByDOI(last_doi)
result = conceptrec
# last_doi <- tail(conceptrec$getVersions(),1L)$doi
# if(length(last_doi)==0) {
# if(nzchar(conceptrec$metadata$doi)){
# last_doi = conceptrec$metadata$doi
# }else{
# last_doi = conceptrec$metadata$prereserve_doi$doi
# }
# }
# result <- self$getDepositionByDOI(last_doi)
}
}
return(result)
Expand Down

0 comments on commit 7f6515f

Please sign in to comment.