From 178d28fe85c33f74937a63cf27f811b4921831d1 Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 31 Dec 2024 08:21:45 +0100 Subject: [PATCH] make ISOCodeListValue use permissive in case no codelist is identified --- R/ISOCodeListValue.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/ISOCodeListValue.R b/R/ISOCodeListValue.R index fc3c1022..b8f5baad 100644 --- a/R/ISOCodeListValue.R +++ b/R/ISOCodeListValue.R @@ -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 @@ -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)