From 309279253c65d04a92715ee7256a66b77753e65c Mon Sep 17 00:00:00 2001 From: Anders Jensen-Urstad Date: Mon, 16 Oct 2023 17:54:10 +0200 Subject: [PATCH] lddbToTrig: add workaround for records with broken encodingLevel --- importers/src/main/groovy/whelk/importer/ImporterMain.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importers/src/main/groovy/whelk/importer/ImporterMain.groovy b/importers/src/main/groovy/whelk/importer/ImporterMain.groovy index c3a923edc7..7d80357169 100644 --- a/importers/src/main/groovy/whelk/importer/ImporterMain.groovy +++ b/importers/src/main/groovy/whelk/importer/ImporterMain.groovy @@ -241,7 +241,7 @@ class ImporterMain { private static void filterProblematicData(id, data) { if (data instanceof Map) { data.removeAll { entry -> - return entry.key.startsWith("generic") || entry.key.equals("marc:hasGovernmentDocumentClassificationNumber") + return entry.key.startsWith("generic") || entry.key.equals("marc:hasGovernmentDocumentClassificationNumber") || (entry.key.equals("encodingLevel") && entry.value.contains(" ")) } data.keySet().each { property -> filterProblematicData(id, data[property])