diff --git a/files/classes/comment.py b/files/classes/comment.py index 158929196..79132147e 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -392,10 +392,11 @@ class Comment(Base): if not self.total_poll_voted(v): body += ' d-none' body += f'"> - {c.upvotes} votes' - curr = self.total_choice_voted(v) - if curr: curr = " value=" + str(curr[0].comment_id) - else: curr = '' - body += f'' + if self.choices: + curr = self.total_choice_voted(v) + if curr: curr = " value=" + str(curr[0].comment_id) + else: curr = '' + body += f'' for c in self.choices: body += f'''