From 5c197d4d315581580ea6640634e0d2b59aa05e50 Mon Sep 17 00:00:00 2001 From: kwahlin Date: Mon, 23 Oct 2023 14:34:58 +0200 Subject: [PATCH] Check exclude list also when actually about to remove doc --- .../src/main/groovy/whelk/component/PostgreSQLComponent.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy b/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy index 62d26299b3..f005b24a42 100644 --- a/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy +++ b/whelk-core/src/main/groovy/whelk/component/PostgreSQLComponent.groovy @@ -2585,7 +2585,7 @@ class PostgreSQLComponent { void remove(String identifier, String changedIn, String changedBy, boolean force=false) { if (versioning) { - if(!force && !followDependers(identifier).isEmpty()) + if(!force && !followDependers(identifier, JsonLd.ALLOW_LINK_TO_DELETED).isEmpty()) throw new RuntimeException("Deleting depended upon records is not allowed.") log.debug("Marking document with ID ${identifier} as deleted.")