mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 01:02:09 -05:00
replace overeager deletion
This commit is contained in:
@@ -418,6 +418,12 @@ class TemplateSchemaNoDetail(TemplateSchema):
|
|||||||
'version',
|
'version',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@pre_dump
|
||||||
|
def remove_content_for_non_broadcast_templates(self, template, **kwargs):
|
||||||
|
template.content = None
|
||||||
|
|
||||||
|
return template
|
||||||
|
|
||||||
|
|
||||||
class TemplateHistorySchema(BaseSchema):
|
class TemplateHistorySchema(BaseSchema):
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,6 @@ def get_all_templates_for_service(service_id):
|
|||||||
data = template_schema.dump(templates, many=True)
|
data = template_schema.dump(templates, many=True)
|
||||||
else:
|
else:
|
||||||
data = template_schema_no_detail.dump(templates, many=True)
|
data = template_schema_no_detail.dump(templates, many=True)
|
||||||
print(data)
|
|
||||||
return jsonify(data=data)
|
return jsonify(data=data)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user