From 55a1f69c9cf9089d697c60e2ee0e57d5b991d132 Mon Sep 17 00:00:00 2001 From: rebecca Date: Sat, 14 Nov 2026 21:06:54 +0000 Subject: make it so that you can actually still post after a poll is closed --- apioforum/thread.py | 4 ++-- 1 file 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: -- cgit v1.2.3