Skip to content

Commit

Permalink
Display metadata group undefined in the ruleset
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Ronge committed Jun 18, 2020
1 parent 702c69c commit 229dd97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ Pair<Method, Object> getStructureFieldValue() throws InvalidMetadataValueExcepti

@Override
public boolean isValid() {
if (Objects.isNull(settings)) {
return false;
}
if (Objects.isNull(value) || value.isEmpty()) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,9 @@ public String getReferringView() {
* @return whether the given ProcessDetail can be added or not
*/
public boolean canBeAdded(ProcessDetail processDetail) {
if (!processDetail.isValid()) {
return false;
}
if (Objects.nonNull(this.getAddDocStrucTypeDialog().getSelectAddableMetadataTypesItems())) {
return this.getAddDocStrucTypeDialog().getSelectAddableMetadataTypesItems().stream()
.map(SelectItem::getValue).collect(Collectors.toList()).contains(processDetail.getMetadataID());
Expand Down

0 comments on commit 229dd97

Please sign in to comment.