diff options
author | ubq323 <ubq323> | 2021-06-25 23:27:55 +0000 |
---|---|---|
committer | ubq323 <ubq323> | 2021-06-25 23:27:55 +0000 |
commit | 2327776fa7d720f4cf46baa71da78223a185cedc (patch) | |
tree | 2813d236e6076c4536fa430a2c62a9bf0a227d11 | |
parent | 3c2a773095e23a75d2fcb1ca92699228313f6715 (diff) |
fix crash when posting an empty message
-rw-r--r-- | apioforum/thread.py | 3 |
1 files changed, 2 insertions, 1 deletions
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/<int:post_id>", methods=["GET","POST"]) def delete_post(post_id): |