Skip to content

Commit

Permalink
Fixing empty message in contact information resulting from issue Neot…
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonGoring committed Mar 28, 2019
1 parent a371134 commit 41aab58
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion R/assign_doi.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ assign_doi <- function(ds_id, con, post = FALSE) {

contact <- fromJSON(paste0("http://api-dev.neotomadb.org/v2.0/data/datasets/",
ds_id, "/contacts"),
simplifyVector = FALSE)$data[[1]]$contact
simplifyVector = FALSE)

if (length(contact$data) > 0) {
contact <- contact$data[[1]]$contact
} else {
contact <- data.frame(contactid = NA,
fullName = 'None listed',
address = 'None listed')
}

schema <- XML::xmlSchemaParse("data/metadata.xsd")

Expand Down

0 comments on commit 41aab58

Please sign in to comment.