DEV: Use new API to preload category custom fields (#521)
This commit is contained in:
parent
5055bcbb2c
commit
c234819131
|
@ -171,7 +171,12 @@ after_initialize do
|
|||
|
||||
on(:unassign_topic) { |topic, unassigning_user| Assigner.new(topic, unassigning_user).unassign }
|
||||
|
||||
Site.preloaded_category_custom_fields << "enable_unassigned_filter"
|
||||
if respond_to?(:register_preloaded_category_custom_fields)
|
||||
register_preloaded_category_custom_fields("enable_unassigned_filter")
|
||||
else
|
||||
# TODO: Drop the if-statement and this if-branch in Discourse v3.2
|
||||
Site.preloaded_category_custom_fields << "enable_unassigned_filter"
|
||||
end
|
||||
|
||||
BookmarkQuery.on_preload do |bookmarks, bookmark_query|
|
||||
if SiteSetting.assign_enabled?
|
||||
|
|
Loading…
Reference in New Issue