fix 500 error on posting
parent
1a47d9a916
commit
f9b56bd046
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue