Skip to content

Commit

Permalink
Merge pull request #173 from Rafnuss/master
Browse files Browse the repository at this point in the history
A few minor fixes
  • Loading branch information
eblondel authored Feb 5, 2025
2 parents 51474b2 + cc70902 commit 0f85c25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/ZenodoRecord.R
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ ZenodoRecord <- R6Class("ZenodoRecord",
)
if(!is.null(resource_type)) {
zenodo = ZenodoManager$new()
res = ZENODO$getResourceTypeById(resource_type)
res = zenodo$getResourceTypeById(resource_type)
if(!is.null(res)){
new_rel$resource_type = list(id = resource_type)
}
Expand Down Expand Up @@ -909,7 +909,7 @@ ZenodoRecord <- R6Class("ZenodoRecord",
#' @description Set subjects
#' @param subjects a vector or list of subjects to set for the record
setSubjects = function(subjects){
if(is.null(self$metadata$subjects)) self$metadata$subjects <- list()
self$metadata$subjects <- list()
for(subject in subjects){
self$addSubject(subject)
}
Expand Down Expand Up @@ -1282,7 +1282,7 @@ ZenodoRecord <- R6Class("ZenodoRecord",
exportAs = function(format, filename, append_format = TRUE){
zenodo_url <- self$links$record_html
if(is.null(zenodo_url)) zenodo_url <- self$links$self_html
if(is.null(zenodo_url)){
if(self$is_draft){
stop("Ups, this record seems a draft, can't export metadata until it is published!")
}
metadata_export_url <- switch(format,
Expand Down
1 change: 1 addition & 0 deletions zen4R.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: d92a0b8d-3a34-4931-9b4b-d592676d6104

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down

0 comments on commit 0f85c25

Please sign in to comment.