From 2327776fa7d720f4cf46baa71da78223a185cedc Mon Sep 17 00:00:00 2001 From: ubq323 Date: Fri, 25 Jun 2021 23:27:55 +0000 Subject: fix crash when posting an empty message --- apioforum/thread.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apioforum/thread.py b/apioforum/thread.py index e6d3690..5f4b0af 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -55,7 +55,8 @@ def create_post(thread_id): ) db.commit() flash("post posted postfully") - return redirect(post_jump(thread_id, post_id)) + return redirect(post_jump(thread_id, post_id)) + return redirect(url_for('thread.view_thread',thread_id=thread_id)) @bp.route("/delete_post/", methods=["GET","POST"]) def delete_post(post_id): -- cgit v1.2.3