From 2d812c9c01bdc94e56500c0c0ffe187117e7696a Mon Sep 17 00:00:00 2001 From: citrons Date: Mon, 9 Aug 2021 20:00:42 +0000 Subject: fix bug in deleting threads without permission --- apioforum/thread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apioforum/thread.py b/apioforum/thread.py index 3c054d7..2fc9dca 100644 --- a/apioforum/thread.py +++ b/apioforum/thread.py @@ -250,7 +250,7 @@ def delete_thread(thread_id): return redirect("/") if not has_permission(thread['forum'], g.user, "p_delete_posts"): flash("you do not have permission to do that") - return redirect(url_for("thread.view_thread",thread_id=post["thread"])) + return redirect(url_for("thread.view_thread",thread_id=thread_id)) if request.method == "POST": db.execute("DELETE FROM posts WHERE thread = ?",(thread_id,)) db.execute("DELETE FROM threads WHERE id = ?",(thread_id,)) -- cgit v1.2.3