rename template.serialize to serialize_for_v2

make it clear that this is for the public api, and we shouldn't add
fields to it without considering impacts

also add the broadcast_messages relationship on service and template to
the exclude from the marshmallow schemas, so it's not included elsewhere
This commit is contained in:
Leo Hemsted
2020-07-06 16:41:53 +01:00
parent 5f337f7914
commit 0282a76bf7
7 changed files with 10 additions and 10 deletions

View File

@@ -260,6 +260,7 @@ class ServiceSchema(BaseSchema, UUIDsAsStringsMixin):
'users',
'version',
'whitelist',
'broadcast_messages',
)
strict = True
@@ -326,6 +327,7 @@ class DetailedServiceSchema(BaseSchema):
'users',
'version',
'whitelist',
'broadcast_messages',
)
@@ -350,7 +352,7 @@ class BaseTemplateSchema(BaseSchema):
class Meta:
model = models.Template
exclude = ("service_id", "jobs", "service_letter_contact_id")
exclude = ("service_id", "jobs", "service_letter_contact_id", "broadcast_messages")
strict = True