Skip to content

Commit

Permalink
fix #145
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Mar 13, 2024
1 parent abd0317 commit dc20be9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/ZenodoRecord.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ ZenodoRecord <- R6Class("ZenodoRecord",
self$recid = obj$recid
self$links = obj$links
self$metadata = obj$metadata
resource_type = self$metadata$resource_type
if(!is.null(resource_type)){
resource_type_id = resource_type$type
if(!is.null(resource_type$subtype)) resource_type_id = paste(resource_type_id, resource_type$subtype,sep="-")
self$metadata$resource_type = list(id = resource_type_id)
}
self$modified = obj$modified
self$owners = obj$owners
self$status = obj$status
Expand Down Expand Up @@ -242,7 +248,7 @@ ZenodoRecord <- R6Class("ZenodoRecord",
self$ERROR(errorMsg)
stop(errorMsg)
}
self$metadata$resource_type <- zen_resourcetype
self$metadata$resource_type <- list(id = zen_resourcetype$id)
},

#' @description Set the upload type (mandatory). Deprecated since zen4R 1.0
Expand Down

0 comments on commit dc20be9

Please sign in to comment.