mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-02-03 00:31:25 -08:00
Bugfix for poll edits
This commit is contained in:
parent
ae68eecb65
commit
7c33c40f09
1 changed files with 2 additions and 1 deletions
|
@ -472,7 +472,8 @@ def save_post(form, post: Post, type: str):
|
|||
poll = Poll(post_id=post.id)
|
||||
db.session.add(poll)
|
||||
poll.mode = form.mode.data
|
||||
poll.end_poll = end_poll_date(form.finish_in.data)
|
||||
if form.finish_in:
|
||||
poll.end_poll = end_poll_date(form.finish_in.data)
|
||||
poll.local_only = form.local_only.data
|
||||
poll.latest_vote = None
|
||||
db.session.commit()
|
||||
|
|
Loading…
Add table
Reference in a new issue