From 129e396a706f5ed9987167cc5dae20ce4e4af26d Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 14 May 2024 01:35:00 +0200 Subject: [PATCH] fix deleteRecords based on inveniordm json format --- R/ZenodoManager.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ZenodoManager.R b/R/ZenodoManager.R index a433192..d2d829a 100644 --- a/R/ZenodoManager.R +++ b/R/ZenodoManager.R @@ -1267,7 +1267,7 @@ ZenodoManager <- R6Class("ZenodoManager", #' @return \code{TRUE} if all records have been deleted, \code{FALSE} otherwise deleteRecords = function(q = "", size = 10){ records <- self$getDepositions(q = q, size = size) - records <- records[sapply(records, function(x){!x$submitted})] + records <- records[sapply(records, function(x){x$status == "draft"})] hasDraftRecords <- length(records)>0 if(length(records)>0){ record_ids <- sapply(records, function(x){x$id})