Skip to content

Commit

Permalink
make ISOCodeListValue use permissive in case no codelist is identified
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Dec 31, 2024
1 parent 3526a3e commit 178d28f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/ISOCodeListValue.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ ISOCodeListValue <- R6Class("ISOCodeListValue",
if(id=="CountryCode") id <- "Country"
cl <- getISOCodelist(id)
if(is.null(cl)){
stop(sprintf("No ISO codelist for identifier '%s'", id))
warnings(sprintf("No ISO codelist for identifier '%s'", id))
}
self$codelistId = cl
clCodeSpace <- cl$codeSpace
Expand Down Expand Up @@ -111,7 +111,7 @@ ISOCodeListValue <- R6Class("ISOCodeListValue",
}

clUrl = ""
if(!is.na(cl$refFile)){
if(!is.null(cl)) if(!is.na(cl$refFile)){
isLocalFile <- !grepl("^http", cl$refFile) & !grepl("^https", cl$refFile)
clUrl <- paste(cl$refFile, id, sep="#")
clUrl <- gsub("ML_", "", clUrl)
Expand Down

0 comments on commit 178d28f

Please sign in to comment.