Skip to content

Commit

Permalink
Fix Upsert
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitolo-Andrea committed Nov 13, 2024
1 parent 8c7e342 commit 70b9158
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public Mono<TppDTO> upsert(TppDTO tppDTO) {
Mono.defer(() -> {
log.info("[TPP-SERVICE][UPSERT] TPP with tppId [{}] does not exist. Creating new entry...", tppDTO.getTppId());
Tpp tppToSave = mapperToObject.map(tppDTO);
tppToSave.setId(generateTppId());
tppToSave.setTppId(generateTppId());
return tppRepository.save(tppToSave)
.doOnSuccess(savedTpp -> log.info("{[TPP-SERVICE][UPSERT] Updated existing TPP with tppId: {}", tppToSave.getTppId()))
.doOnError(error -> log.error("[TPP-SERVICE][SAVE] Error saving TPP with tppId {}: {}", tppToSave.getTppId(), error.getMessage()));
Expand Down

0 comments on commit 70b9158

Please sign in to comment.