From a02765911e355d0808022f292842c887ae84abfb Mon Sep 17 00:00:00 2001 From: kwahlin Date: Thu, 21 Nov 2024 11:51:11 +0100 Subject: [PATCH] Add inScheme only if blank node --- .../main/resources/bulk-change-scripts/removeSubdivision.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whelktool/src/main/resources/bulk-change-scripts/removeSubdivision.groovy b/whelktool/src/main/resources/bulk-change-scripts/removeSubdivision.groovy index 4dbf9ddecd..276634d58f 100644 --- a/whelktool/src/main/resources/bulk-change-scripts/removeSubdivision.groovy +++ b/whelktool/src/main/resources/bulk-change-scripts/removeSubdivision.groovy @@ -109,7 +109,7 @@ static DocumentUtil.Operation mapSubject(Map complexSubject, termComponentList, } if (t2.size() == 1) { def remaining = t2.first() - if (complexSubject['inScheme']) { + if (complexSubject['inScheme'] && !remaining[ID_KEY]) { remaining['inScheme'] = complexSubject['inScheme'] } return new DocumentUtil.Replace(remaining)