Skip to content

Commit

Permalink
fix : price null 처리
Browse files Browse the repository at this point in the history
  • Loading branch information
imenuuu committed Apr 2, 2024
1 parent 0d621d6 commit 538e444
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public TastingNoteResponse.TasteAnalysisDTO TasteAnalysis(List<TastingNote> tast
bodySum += tastingNote.getBody();
tanninSum += tastingNote.getTannins();
finishSum += tastingNote.getFinish();
totalPrice += tastingNote.getPrice();
totalPrice += tastingNote.getPrice() != null ? tastingNote.getPrice() : 0;


wineCountByCountry.put(country, wineCountByCountry.getOrDefault(country, 0) + 1);
Expand Down Expand Up @@ -238,7 +238,7 @@ public TastingNote CreateTastingNote(TastingNoteRequest.CreateTastingNoteDTO req
.vintage(request.getVintage())
.tannins(request.getTannin())
.finish(request.getFinish())
.price(request.getPrice())
.price(request.getPrice() != null ? request.getPrice() : 0)
.memo(request.getMemo())
.buyAgain(request.getBuyAgain())
.starRating(request.getRating())
Expand Down

0 comments on commit 538e444

Please sign in to comment.