Skip to content

Commit

Permalink
test: 추천 경우 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
GalaxyDimension committed Aug 14, 2024
1 parent 5b248f9 commit cdfaeb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reviews/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@ def evaluate_review(request, restaurant_id, review_id):
)

evaluation = request.data.get("evaluation")
if evaluation == "1":
if evaluation == "1" or evaluation == 1:
# 좋아요
if created or recommend_entry.recommend != 1:
review.recommend_count += 1
if recommend_entry.recommend == 0: # 이전에 싫어요였던 경우
review.decommend_count -= 1
recommend_entry.recommend = 1

elif evaluation == "0":
elif evaluation == "0" or evaluation == 0:
# 싫어요
if created or recommend_entry.recommend != 0:
review.decommend_count += 1
Expand Down

0 comments on commit cdfaeb9

Please sign in to comment.