From baae4530123a441cae903af198038917bb337f0c Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Fri, 15 Oct 2021 15:49:22 +0800 Subject: [PATCH] DEV: Remove useless assignment in `TopicView#filter_posts_paged`. (#14618) Assignment is already done in `TopicView#filter_posts_by_ids` --- lib/topic_view.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/topic_view.rb b/lib/topic_view.rb index bcd61346753..ffb5ec08294 100644 --- a/lib/topic_view.rb +++ b/lib/topic_view.rb @@ -346,7 +346,7 @@ class TopicView # Sometimes we don't care about the OP, for example when embedding comments min = 1 if min == 0 && @exclude_first - @posts = filter_posts_by_ids( + filter_posts_by_ids( @filtered_posts.order(:sort_order) .offset(min) .limit(@limit)