PERF: Remove N+1 queries on search topic list item serializer.
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user