Skip to content

Commit 23d4baf

Browse files
committed
work in progress
1 parent 26a76fd commit 23d4baf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/org/woehlke/simpleworklist/project/ProjectServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ public Project findByProjectId(@Min(1L) long projectId) {
8181
public Project add(@NotNull Project entity) {
8282
log.info("saveAndFlush");
8383
entity.setUuid(UUID.randomUUID().toString());
84+
if(entity.getContext()!=null){
85+
if(entity.getContext().getUuid() == null){
86+
entity.getContext().setUuid(UUID.randomUUID().toString());
87+
}
88+
}
8489
return projectRepository.saveAndFlush(entity);
8590
}
8691

0 commit comments

Comments
 (0)