From a24fa002c4c2406011b10848fd871ca72f152ac1 Mon Sep 17 00:00:00 2001 From: kwahlin Date: Thu, 28 Sep 2023 10:19:23 +0200 Subject: [PATCH] Abort and log if missing resources --- .../groovy/whelk/converter/marc/ContributionByRoleStep.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/whelk-core/src/main/groovy/whelk/converter/marc/ContributionByRoleStep.groovy b/whelk-core/src/main/groovy/whelk/converter/marc/ContributionByRoleStep.groovy index c8a6c17983..64312e41b1 100644 --- a/whelk-core/src/main/groovy/whelk/converter/marc/ContributionByRoleStep.groovy +++ b/whelk-core/src/main/groovy/whelk/converter/marc/ContributionByRoleStep.groovy @@ -39,6 +39,10 @@ class ContributionByRoleStep extends MarcFramePostProcStepBase { } void modify(Map record, Map thing) { + if (!relatorLinker || !instanceRelators) { + log.error("Conversion failed: Missing required resources") + return + } moveRoles(thing) }