Skip to content

Commit

Permalink
Fix NPE when validating a process after adding a new metadata group
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramMaalej committed Feb 9, 2022
1 parent 10147dd commit d7aefa7
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,7 @@ public void preserve() throws InvalidMetadataValueException, NoSuchMetadataField
}
if (copy) {
MetadataGroup metadataGroup = new MetadataGroup();
metadataGroup.setKey(metadataKey);
Optional<Domain> optionalDomain = metadataView.getDomain();
optionalDomain.ifPresent(domain -> metadataGroup.setDomain(DOMAIN_TO_MDSEC.get(domain)));
metadataGroup.setGroup(metadata);
Expand Down

0 comments on commit d7aefa7

Please sign in to comment.