From 65392f37bb23ee766c9435d98714715ba2e28346 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 3 May 2016 15:19:59 -0400 Subject: [PATCH] FIX: Apply both embedded post filters --- lib/topic_view.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/topic_view.rb b/lib/topic_view.rb index 8a2ea3b8ea8..27d898b4df9 100644 --- a/lib/topic_view.rb +++ b/lib/topic_view.rb @@ -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