From e7ca1ffbf7e9c737e7bf305f80973beb10b58fd5 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 27 Sep 2017 11:01:29 -0400 Subject: [PATCH] Revert "Fix field not being preloaded in multisite setup." This reverts commit 83b4e9fe3f8a6e486c1ef5a2cdfb8aa61197313b. --- plugin.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index ed110bd..2e68ee9 100644 --- a/plugin.rb +++ b/plugin.rb @@ -33,7 +33,12 @@ after_initialize do end end - TopicList.preloaded_custom_fields << "assigned_to_id" + # 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.on_preload do |topics, topic_list| if SiteSetting.assign_enabled?