mirror of
https://github.com/discourse/discourse.git
synced 2025-09-08 12:06:51 +08:00
FIX: Removed a line by accident, broke tests
This commit is contained in:
parent
6f04bff28c
commit
23dce88f5f
1 changed files with 2 additions and 0 deletions
|
@ -662,6 +662,8 @@ class PostsController < ApplicationController
|
||||||
# Include deleted posts if the user is staff
|
# Include deleted posts if the user is staff
|
||||||
finder = finder.with_deleted if current_user.try(:staff?)
|
finder = finder.with_deleted if current_user.try(:staff?)
|
||||||
post = finder.first
|
post = finder.first
|
||||||
|
raise Discourse::NotFound unless post
|
||||||
|
|
||||||
# load deleted topic
|
# load deleted topic
|
||||||
post.topic = Topic.with_deleted.find(post.topic_id) if current_user.try(:staff?)
|
post.topic = Topic.with_deleted.find(post.topic_id) if current_user.try(:staff?)
|
||||||
raise Discourse::NotFound unless post.topic
|
raise Discourse::NotFound unless post.topic
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue