|
@@ -362,14 +362,12 @@ def delete_post(post_id, slug=None):
|
|
|
flash("You do not have the permissions to edit this post", "danger")
|
|
|
return redirect(post.topic.url)
|
|
|
|
|
|
- topic_id = post.topic_id
|
|
|
-
|
|
|
post.delete()
|
|
|
|
|
|
# If the post was the first post in the topic, redirect to the forums
|
|
|
if post.first_post:
|
|
|
- return redirect(post.topic.url)
|
|
|
- return redirect(url_for('forum.view_topic', topic_id=topic_id))
|
|
|
+ return redirect(post.topic.forum.url)
|
|
|
+ return redirect(post.topic.url)
|
|
|
|
|
|
|
|
|
@forum.route("/post/<int:post_id>/report", methods=["GET", "POST"])
|