Fix field not being preloaded in multisite setup.

This commit is contained in:
Guo Xiang Tan 2017-09-27 16:21:05 +08:00
parent 1198421261
commit 83b4e9fe3f
1 changed files with 1 additions and 6 deletions

View File

@ -33,12 +33,7 @@ after_initialize do
end
end
# We can remove this check once this method is stable
if respond_to?(:add_preloaded_topic_list_custom_field)
add_preloaded_topic_list_custom_field('assigned_to_id')
else
TopicList.preloaded_custom_fields << "assigned_to_id"
end
TopicList.preloaded_custom_fields << "assigned_to_id"
TopicList.on_preload do |topics, topic_list|
if SiteSetting.assign_enabled?