FIX: Apply both embedded post filters

This commit is contained in:
Robin Ward 2016-05-03 15:19:59 -04:00
parent 664f1913c8
commit 65392f37bb
No known key found for this signature in database
GPG Key ID: 0E091E2B4ED1B83D

View File

@ -386,8 +386,8 @@ class TopicView
def unfiltered_posts
result = filter_post_types(@topic.posts)
result = result.with_deleted if @guardian.can_see_deleted_posts?
result = @topic.posts.where("user_id IS NOT NULL") if @exclude_deleted_users
result = @topic.posts.where(hidden: false) if @exclude_hidden
result = result.where("user_id IS NOT NULL") if @exclude_deleted_users
result = result.where(hidden: false) if @exclude_hidden
result
end