mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-16 20:48:37 -04:00
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:
@@ -991,7 +991,7 @@ class TemplateBase(db.Model):
|
||||
template.values = values
|
||||
return template
|
||||
|
||||
def serialize(self):
|
||||
def serialize_for_v2(self):
|
||||
serialized = {
|
||||
"id": str(self.id),
|
||||
"type": self.template_type,
|
||||
@@ -1009,7 +1009,6 @@ class TemplateBase(db.Model):
|
||||
for key in self._as_utils_template().placeholders
|
||||
},
|
||||
"postage": self.postage,
|
||||
"broadcast_data": self.broadcast_data
|
||||
}
|
||||
|
||||
return serialized
|
||||
|
||||
Reference in New Issue
Block a user