FIX: Show the deleted icon if the quote expands a deleted topic

This commit is contained in:
Robin Ward 2017-10-23 13:41:41 -04:00
parent 48314d04f7
commit 89a1b34480
1 changed files with 2 additions and 1 deletions

View File

@ -662,9 +662,10 @@ class PostsController < ApplicationController
# Include deleted posts if the user is staff
finder = finder.with_deleted if current_user.try(:staff?)
post = finder.first
raise Discourse::NotFound unless post
# load deleted topic
post.topic = Topic.with_deleted.find(post.topic_id) if current_user.try(:staff?)
raise Discourse::NotFound unless post.topic
guardian.ensure_can_see!(post)
post
end