fix 500 errors

master
Aevann1 2022-09-06 00:55:26 +02:00
parent ef5c3c89ee
commit da52d00ad3
2 changed files with 3 additions and 2 deletions

View File

@ -377,7 +377,8 @@ class Comment(Base):
if c.voted(v): body += " checked" if c.voted(v): body += " checked"
if v: 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')"''' body += f''' onchange="poll_vote('{c.id}', 'comment')"'''
else: body += f''' onchange="poll_vote_no_v('{c.id}', '{self.id}')"''' else: body += f''' onchange="poll_vote_no_v('{c.id}', '{self.id}')"'''
body += f'''><label class="custom-control-label" for="{c.id}">{c.body_html}<span class="presult-{self.id}''' body += f'''><label class="custom-control-label" for="{c.id}">{c.body_html}<span class="presult-{self.id}'''

View File

@ -381,7 +381,7 @@ class Submission(Base):
if o.voted(v): body += " checked" if o.voted(v): body += " checked"
if v: if v:
if self.sub in ('furry','vampire','racist','femboy') and not (v.house and v.house.lower().startswith(sub)): body += ' disabled ' if self.sub in ('furry','vampire','racist','femboy') and not (v.house and v.house.lower().startswith(self.sub)): body += ' disabled '
body += f''' onchange="poll_vote('{o.id}', 'post')"''' body += f''' onchange="poll_vote('{o.id}', 'post')"'''
else: body += f''' onchange="poll_vote_no_v('{o.id}', '{self.id}')"''' else: body += f''' onchange="poll_vote_no_v('{o.id}', '{self.id}')"'''
body += f'''><label class="custom-control-label" for="{o.id}">{o.body_html}<span class="presult-{self.id}''' body += f'''><label class="custom-control-label" for="{o.id}">{o.body_html}<span class="presult-{self.id}'''