aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcitrons <citrons>2021-08-09 20:00:42 +0000
committercitrons <citrons>2021-08-09 20:00:42 +0000
commit2d812c9c01bdc94e56500c0c0ffe187117e7696a (patch)
tree4235c00596258027cecf30abaa90f7fefa0acb58
parent947c8168f1ce5df05fabc93975049b3ee49ad499 (diff)
fix bug in deleting threads without permissionbureaucracy
-rw-r--r--apioforum/thread.py2
1 files changed, 1 insertions, 1 deletions
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,))