From ca2d537665a561dc6af3a1cacbc9350d8501a242 Mon Sep 17 00:00:00 2001 From: Vinoth Kannan Date: Sun, 17 Mar 2019 23:20:05 +0530 Subject: [PATCH] PERF: Remove N+1 queries on search topic list item serializer. --- plugin.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin.rb b/plugin.rb index 1f58739..4f76f18 100644 --- a/plugin.rb +++ b/plugin.rb @@ -505,6 +505,7 @@ SQL TopicList.preloaded_custom_fields << "accepted_answer_post_id" if TopicList.respond_to? :preloaded_custom_fields Site.preloaded_category_custom_fields << "enable_accepted_answers" if Site.respond_to? :preloaded_category_custom_fields + Search.preloaded_topic_custom_fields << "accepted_answer_post_id" if Search.respond_to? :preloaded_topic_custom_fields if CategoryList.respond_to?(:preloaded_topic_custom_fields) CategoryList.preloaded_topic_custom_fields << "accepted_answer_post_id"