Skip to content

Commit 55d289b

Browse files
committed
fix(bulk): Fix bad fixup
1 parent 7bbb969 commit 55d289b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

whelktool/src/main/java/whelk/datatool/bulkchange/BulkJobDocument.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ public SpecType getSpecificationType() {
160160
}
161161

162162
public Specification getSpecification() {
163+
Map<String, Object> spec = getSpecificationRaw();
164+
if (spec == null) {
165+
throw new ModelValidationException("Nothing in " + SPECIFICATION_PATH);
166+
}
167+
168+
String specType = get(spec, JsonLd.TYPE_KEY);
163169
return switch(getSpecificationType()) {
164170
case SpecType.Update -> new Specification.Update(
165171
get(spec, MATCH_FORM_KEY, Collections.emptyMap()),

0 commit comments

Comments
 (0)