Fix the build.

This commit is contained in:
Guo Xiang Tan 2017-08-01 17:57:26 +09:00
parent 1197750e7d
commit bd0efb8525

View File

@ -25,12 +25,18 @@ class CategoryList
trim_results
if preloaded_topic_custom_fields.present?
displayable_topics = @categories.map(&:displayable_topics)
displayable_topics.flatten!
displayable_topics.compact!
if displayable_topics.present?
Topic.preload_custom_fields(
@categories.map(&:displayable_topics).flatten,
displayable_topics,
preloaded_topic_custom_fields
)
end
end
end
def preload_key
"categories_list".freeze