fix 500 error

pull/139/head
Aevann 2023-03-12 20:02:50 +02:00
parent f344cdd36f
commit 1d13c1f4da
1 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,11 @@ def add_options(self, body, v):
if o.voted(v): option_body += " checked"
if v:
sub = self.sub
if kind == 'post':
sub = self.sub
else:
sub = self.parent.sub
if sub in {'furry','vampire','racist','femboy'} and not v.house.lower().startswith(sub): option_body += ' disabled '
option_body += f''' data-nonce="{g.nonce}" data-onclick="poll_vote_{o.exclusive}('{o.id}', '{self.id}', '{kind}')"'''
else: