Skip to content

Commit

Permalink
fix error where customizable enum entity disease column is an empty s…
Browse files Browse the repository at this point in the history
…tring (instead of null) when the dto disease collection is empty.
  • Loading branch information
obinna-h-n committed Jan 24, 2025
1 parent dafe50a commit bb80d5b
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit bb80d5b

Please sign in to comment.