Skip to content

Commit

Permalink
Merge pull request kitodo#6166 from matthias-ronge/patch-99
Browse files Browse the repository at this point in the history
Fix NullPointerException if ruleset could not be loaded
  • Loading branch information
solth authored Sep 2, 2024
2 parents c347da7 + ea47736 commit 6b2ded0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
package org.kitodo.production.forms.createprocess;

import java.util.List;
import java.util.Objects;

import javax.faces.model.SelectItem;

Expand Down Expand Up @@ -64,6 +65,9 @@ public List<SelectItem> getAddableMetadata() {
* @return whether any further metadata can be added to currently selected structure element.
*/
public boolean metadataAddableToStructureElement() throws InvalidMetadataValueException {
if (Objects.isNull(createProcessForm.getRulesetManagement())) {
return false;
}
prepareAddableMetadataForStructure();
return !getAddableMetadata().isEmpty();
}
Expand Down

0 comments on commit 6b2ded0

Please sign in to comment.