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) g.db.add(choice)
for bet in bets: if v and v.admin_level > 2:
bet = SubmissionOption( for bet in bets:
submission_id=post.id, bet = SubmissionOption(
body_html=filter_emojis_only(bet), submission_id=post.id,
exclusive=2 body_html=filter_emojis_only(bet),
) exclusive=2
g.db.add(bet) )
g.db.add(bet)
vote = Vote(user_id=v.id, vote = Vote(user_id=v.id,
vote_type=1, vote_type=1,