diff options
| author | rebecca <ubq323@ubq323.website> | 2026-11-14 21:06:54 +0000 |
|---|---|---|
| committer | rebecca <ubq323@ubq323.website> | 2026-11-14 21:06:54 +0000 |
| commit | 55a1f69c9cf9089d697c60e2ee0e57d5b991d132 (patch) | |
| tree | 48cc6d4625da651fc89eac8654eeea8eda6b1f48 | |
| parent | 98f62e158ead1d9a2c7c5bd93e7a4b53e219c329 (diff) | |
make it so that you can actually still post after a poll is closed
| -rw-r--r-- | apioforum/thread.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apioforum/thread.py b/apioforum/thread.py index 2cfe973..fdf0e0f 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -308,10 +308,10 @@ def create_post(thread_id): vote_id = None if thread['poll'] is not None: poll = db.execute("SELECT * FROM polls WHERE id = ?",(thread['poll'],)).fetchone() - if poll['closed']: + pollval = request.form.get('poll') + if poll['closed'] and pollval is not None: flash("this poll has been closed and may not receive further votes") return redirect(url_for('thread.view_thread',thread_id=thread_id)) - pollval = request.form.get('poll') try: vote_id = register_vote(thread,pollval) except ValueError: |
