From da52d00ad3a9854a96219d176bc39756832e0fd1 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 6 Sep 2022 00:55:26 +0200 Subject: [PATCH] fix 500 errors --- files/classes/comment.py | 3 ++- files/classes/submission.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/classes/comment.py b/files/classes/comment.py index f6d704f44..131c13574 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -377,7 +377,8 @@ class Comment(Base): if c.voted(v): body += " checked" if v: - if self.post.sub in ('furry','vampire','racist','femboy') and not (v.house and v.house.lower().startswith(sub)): body += ' disabled ' + sub = self.post.sub + if sub in ('furry','vampire','racist','femboy') and not (v.house and v.house.lower().startswith(sub)): body += ' disabled ' body += f''' onchange="poll_vote('{c.id}', 'comment')"''' else: body += f''' onchange="poll_vote_no_v('{c.id}', '{self.id}')"''' body += f'''>