DEV: Move form_template_ids serializer location (#20446)

This commit is contained in:
Keegan George
2023-02-28 09:09:20 -08:00
committed by GitHub
parent 366f5e08d7
commit def4133d59
7 changed files with 24 additions and 7 deletions

View File

@@ -19,7 +19,6 @@ class BasicCategorySerializer < ApplicationSerializer
:notification_level,
:can_edit,
:topic_template,
:form_template_ids,
:has_children,
:sort_order,
:sort_ascending,
@@ -92,8 +91,4 @@ class BasicCategorySerializer < ApplicationSerializer
def include_custom_fields?
custom_fields.present?
end
def include_form_template_ids?
SiteSetting.experimental_form_templates
end
end

View File

@@ -1,7 +1,11 @@
# frozen_string_literal: true
class SiteCategorySerializer < BasicCategorySerializer
attributes :allowed_tags, :allowed_tag_groups, :allow_global_tags, :read_only_banner
attributes :allowed_tags,
:allowed_tag_groups,
:allow_global_tags,
:read_only_banner,
:form_template_ids
has_many :category_required_tag_groups, key: :required_tag_groups, embed: :objects