PERF: Remove N+1 queries on search topic list item serializer.
This commit is contained in:
parent
8b8512e73e
commit
ca2d537665
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue