Skip to content

Commit

Permalink
FIX: Preload category custom fields (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
nbianca authored Nov 2, 2023
1 parent 7e162ca commit 0d5a12c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ module ::DiscoursePostEvent
Category.register_custom_field_type("disable_topic_resorting", :boolean)
Site.preloaded_category_custom_fields << "sort_topics_by_event_start_date"
Site.preloaded_category_custom_fields << "disable_topic_resorting"
if defined?(register_category_list_preloaded_category_custom_fields)
register_category_list_preloaded_category_custom_fields("sort_topics_by_event_start_date")
register_category_list_preloaded_category_custom_fields("disable_topic_resorting")
end
end

add_to_serializer :basic_category, :sort_topics_by_event_start_date do
Expand Down

0 comments on commit 0d5a12c

Please sign in to comment.