Skip to content

Commit

Permalink
avoid duplication of metadata groups
Browse files Browse the repository at this point in the history
  • Loading branch information
BartChris committed Feb 28, 2023
1 parent 4362dca commit ae84189
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,8 @@ private void createMetadataTable() {
Collection<Metadata> entered = addLabels(new HashSet<>(metadata));
if (Objects.nonNull(treeNode) && !treeNode.getChildren().isEmpty()) {
try {
entered = entered.stream().filter(metadataElem -> !(metadataElem instanceof MetadataGroup))
.collect(Collectors.toSet());
entered.addAll(DataEditorService.getExistingMetadataRows(treeNode.getChildren()));
} catch (InvalidMetadataValueException e) {
logger.error(e.getLocalizedMessage());
Expand Down

0 comments on commit ae84189

Please sign in to comment.