Add reply_to in the template schema

This commit is contained in:
Rebecca Law
2018-01-03 15:10:16 +00:00
parent 577fe623b0
commit 8732506138
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -315,11 +315,14 @@ class BaseTemplateSchema(BaseSchema):
reply_to = fields.Method("get_reply_to", allow_none=True)
def get_reply_to(self, template):
if template.template_type == 'letter':
text = template.get_reply_to_text()
return text
return template.reply_to
class Meta:
model = models.Template
exclude = ("service_id", "jobs", "service_letter_contact_id")
exclude = ("service_id", "jobs")
strict = True