diff --git a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java index 9de113916a6..a09544d9e64 100644 --- a/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java +++ b/sormas-backend/src/main/java/de/symeda/sormas/backend/customizableenum/CustomizableEnumFacadeEjb.java @@ -134,7 +134,11 @@ protected CustomizableEnumValue fillOrBuildEntity(CustomizableEnumValueDto sourc target.setValue(source.getValue()); target.setCaption(source.getCaption()); target.setTranslations(source.getTranslations()); - target.setDiseases(source.getDiseases()); + if (!source.getDiseases().isEmpty()) { + target.setDiseases(source.getDiseases()); + } else { + target.setDiseases(null); + } target.setDescription(source.getDescription()); target.setDescriptionTranslations(source.getDescriptionTranslations()); target.setProperties(source.getProperties()); @@ -496,7 +500,9 @@ public CustomizableEnumValueDto toDto(CustomizableEnumValue source) { target.setValue(source.getValue()); target.setCaption(source.getCaption()); target.setTranslations(source.getTranslations()); - target.setDiseases(source.getDiseases()); + if (source.getDiseases() != null) { + target.setDiseases(source.getDiseases()); + } target.setDescription(source.getDescription()); target.setDescriptionTranslations(source.getDescriptionTranslations()); target.setProperties(source.getProperties());