From 93dd077514bb9dc5040d5e19daf86875e1913743 Mon Sep 17 00:00:00 2001 From: SvyatoslavArtymovych Date: Wed, 10 May 2023 15:38:04 +0300 Subject: [PATCH] small changes in vote_count properties --- app/models/comment.py | 4 ++-- app/models/interpretation.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/comment.py b/app/models/comment.py index a909ff3..b46dd52 100644 --- a/app/models/comment.py +++ b/app/models/comment.py @@ -39,8 +39,8 @@ class Comment(BaseModel): for vote in self.votes: if vote.positive: count += 1 - else: - count -= 1 + continue + count -= 1 return count diff --git a/app/models/interpretation.py b/app/models/interpretation.py index 5e9491a..ec73484 100644 --- a/app/models/interpretation.py +++ b/app/models/interpretation.py @@ -36,8 +36,8 @@ class Interpretation(BaseModel): for vote in self.votes: if vote.positive: count += 1 - else: - count -= 1 + continue + count -= 1 return count