Skip to content

Commit 07eec30

Browse files
authored
Merge pull request #13745 from SORMAS-Foundation/bugfix-13740-error_edit_pathogen_nat_clinician
#13740 - Fixed error when editing pathogen test in clinician view
2 parents a96519c + 078076b commit 07eec30

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

sormas-ui/src/main/java/de/symeda/sormas/ui/utils/NullableOptionGroup.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,20 @@ private Object getFirstValue(Set value) {
8484
return value.stream().findFirst().orElse(null);
8585
}
8686

87+
@SuppressWarnings("unchecked")
8788
public void setInaccessible() {
8889
this.removeAllItems();
8990
Item item = this.addItem(1);
91+
92+
if(item == null) {
93+
return;
94+
}
95+
96+
if (item.getItemPropertyIds().isEmpty()) {
97+
return;
98+
}
99+
90100
item.getItemProperty(item.getItemPropertyIds().stream().findFirst().get()).setValue(I18nProperties.getCaption(Captions.inaccessibleValue));
101+
91102
}
92103
}

0 commit comments

Comments
 (0)