From 5afa0c0d2a70e3d476138fff97dd585853a77087 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 26 Apr 2022 16:15:06 +0200 Subject: [PATCH] fsd --- files/classes/submission.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/files/classes/submission.py b/files/classes/submission.py index a722ad56d1..3c3afaaa13 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -397,10 +397,11 @@ class Submission(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'''