FIX: If a user is deleted, don't break embedded comments for admins.

This commit is contained in:
Robin Ward
2014-06-18 17:39:12 -04:00
parent 08b8cacdb0
commit 60cb5ea6a9
3 changed files with 9 additions and 2 deletions

View File

@@ -307,6 +307,7 @@ class TopicView
def unfiltered_posts
result = @topic.posts
result = result.with_deleted if @user.try(:staff?)
result = @topic.posts.where("user_id IS NOT NULL") if @exclude_deleted_users
result
end