diff --git a/files/classes/submission.py b/files/classes/submission.py index 31b25f69d..84d1376cc 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -104,7 +104,7 @@ class Submission(Base): return False def total_choice_voted(self, v): - if v: + if v and self.choices: return g.db.query(CommentVote).filter(CommentVote.user_id == v.id, CommentVote.comment_id.in_(tuple(x.id for x in self.choices))).all() return False