Serialise process_type for template history

We already serialise it in the templates response. We should make sure
the field is also present in the history response, if we want to use
cached template versions when processing notifications.
This commit is contained in:
Chris Hill-Scott
2020-12-23 13:57:38 +00:00
parent 7152ac7cba
commit b1dc8cc758
2 changed files with 4 additions and 0 deletions

View File

@@ -410,6 +410,7 @@ class TemplateHistorySchema(BaseSchema):
reply_to = fields.Method("get_reply_to", allow_none=True)
reply_to_text = fields.Method("get_reply_to_text", allow_none=True)
process_type = field_for(models.Template, 'process_type')
created_by = fields.Nested(UserSchema, only=['id', 'name', 'email_address'], dump_only=True)
created_at = field_for(models.Template, 'created_at', format=DATETIME_FORMAT_NO_TIMEZONE)