Skip to content

Commit ae4c505

Browse files
authored
Merge pull request #248 from DevKor-github/main
[Deploy] main to deploy
2 parents a4ac013 + 7ae02c1 commit ae4c505

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

ontime-back/src/main/java/devkor/ontime_back/service/PreparationUserService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public List<PreparationDto> showAllPreparationUsers(Long userId) {
7878
protected void handlePreparationUsers(User user, List<PreparationDto> preparationDtoList, boolean shouldDeleteExisting) {
7979
if (shouldDeleteExisting) {
8080
preparationUserRepository.deleteByUser(user);
81+
preparationUserRepository.flush();
8182
}
8283

8384
Map<UUID, PreparationUser> preparationMap = new HashMap<>();
@@ -97,6 +98,7 @@ protected void handlePreparationUsers(User user, List<PreparationDto> preparatio
9798
.collect(Collectors.toList());
9899

99100
preparationUserRepository.saveAll(preparationUsers);
101+
preparationUserRepository.flush();
100102

101103
preparationDtoList.stream()
102104
.filter(dto -> dto.getNextPreparationId() != null)

0 commit comments

Comments
 (0)