Make pre/post processors return modified data

https://marshmallow.readthedocs.io/en/stable/upgrading.html#pre-post-processors-must-return-modified-data

We had a few cases where the pre/post processors weren't returning
anything. They now need to return the modified data.
This commit is contained in:
Katie Smith
2022-05-06 15:59:00 +01:00
parent ab2c33f1a3
commit cfb6c9abc0

View File

@@ -59,6 +59,7 @@ class UUIDsAsStringsMixin:
(str(item) if isinstance(item, UUID) else item)
for item in value
]
return data
class BaseSchema(ma.SQLAlchemyAutoSchema):
@@ -282,6 +283,8 @@ class ServiceSchema(BaseSchema, UUIDsAsStringsMixin):
in_data['permissions'] = permissions
return in_data
class DetailedServiceSchema(BaseSchema):
statistics = fields.Dict()
@@ -383,6 +386,8 @@ class TemplateSchemaNoDetail(TemplateSchema):
if template.template_type != models.BROADCAST_TYPE:
template.content = None
return template
class TemplateHistorySchema(BaseSchema):