From 7f6515fac673e06223a0088ffe05ebaca98f6052 Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 14 May 2024 18:12:51 +0200 Subject: [PATCH] #133 getDepositionByConceptDOI fix --- R/ZenodoManager.R | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/R/ZenodoManager.R b/R/ZenodoManager.R index 7aa9369..9cc45b4 100644 --- a/R/ZenodoManager.R +++ b/R/ZenodoManager.R @@ -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)