summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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,))