Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 0dcb04e

Browse files
SORMAS-Foundation#4178 - Handle the null SymptomsDto uuid when creating a visit (SORMAS-Foundation#4217)
* SORMAS-Foundation#4178 - Handle the null SymptomsDto uuid when creating a visit * SORMAS-Foundation#4178 - Code rewrite
1 parent 6c81c79 commit 0dcb04e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

sormas-backend/src/main/java/de/symeda/sormas/backend/symptoms/SymptomsFacadeEjb.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public Symptoms fromDto(SymptomsDto source, boolean checkChangeDate) {
3737
return null;
3838
}
3939

40-
Symptoms target = DtoHelper.fillOrBuildEntity(source, service.getByUuid(source.getUuid()), Symptoms::new, checkChangeDate);
40+
String uuid = source.getUuid();
41+
Symptoms target = DtoHelper.fillOrBuildEntity(source, uuid != null ? service.getByUuid(uuid) : null, Symptoms::new, checkChangeDate);
4142

4243
target.setAbdominalPain(source.getAbdominalPain());
4344
target.setAlteredConsciousness(source.getAlteredConsciousness());

0 commit comments

Comments
 (0)