fix 500 error on posting

remotes/1693045480750635534/spooky-22
Aevann1 2022-08-27 00:05:40 +02:00
parent 1a47d9a916
commit f9b56bd046
1 changed files with 8 additions and 7 deletions

View File

@ -967,13 +967,14 @@ def submit_post(v, sub=None):
)
g.db.add(choice)
for bet in bets:
bet = SubmissionOption(
submission_id=post.id,
body_html=filter_emojis_only(bet),
exclusive=2
)
g.db.add(bet)
if v and v.admin_level > 2:
for bet in bets:
bet = SubmissionOption(
submission_id=post.id,
body_html=filter_emojis_only(bet),
exclusive=2
)
g.db.add(bet)
vote = Vote(user_id=v.id,
vote_type=1,