mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:23:25 +08:00
DEV: Move form_template_ids
serializer location (#20446)
This commit is contained in:
parent
366f5e08d7
commit
def4133d59
|
@ -78,6 +78,7 @@ class Site
|
|||
:uploaded_background,
|
||||
:tags,
|
||||
:tag_groups,
|
||||
:form_templates,
|
||||
category_required_tag_groups: :tag_group,
|
||||
)
|
||||
.joins("LEFT JOIN topics t on t.id = categories.topic_id")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
},
|
||||
"search_priority": {
|
||||
"type": "integer"
|
||||
},
|
||||
"form_template_ids": {
|
||||
"type": "array",
|
||||
"items": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
|
@ -74,6 +74,10 @@
|
|||
"null"
|
||||
]
|
||||
},
|
||||
"form_template_ids": {
|
||||
"type": "array",
|
||||
"items": []
|
||||
},
|
||||
"has_children": {
|
||||
"type": [
|
||||
"string",
|
||||
|
|
|
@ -77,6 +77,10 @@
|
|||
"null"
|
||||
]
|
||||
},
|
||||
"form_template_ids": {
|
||||
"type": "array",
|
||||
"items": []
|
||||
},
|
||||
"has_children": {
|
||||
"type": [
|
||||
"string",
|
||||
|
@ -273,6 +277,7 @@
|
|||
"notification_level",
|
||||
"can_edit",
|
||||
"topic_template",
|
||||
"form_template_ids",
|
||||
"has_children",
|
||||
"sort_order",
|
||||
"sort_ascending",
|
||||
|
|
|
@ -678,6 +678,10 @@
|
|||
},
|
||||
"parent_category_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"form_template_ids": {
|
||||
"type": "array",
|
||||
"items": []
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
|
|
Loading…
Reference in New Issue
Block a user