mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-15 09:42:38 -05:00
Fix the schema for reply_to and added reply_to_text.
This commit is contained in:
@@ -311,15 +311,15 @@ class NotificationModelSchema(BaseSchema):
|
||||
|
||||
|
||||
class BaseTemplateSchema(BaseSchema):
|
||||
|
||||
reply_to = fields.Method("get_reply_to", allow_none=True)
|
||||
reply_to_text = fields.Method("get_reply_to_text", 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
|
||||
|
||||
def get_reply_to_text(self, template):
|
||||
return template.get_reply_to_text()
|
||||
|
||||
class Meta:
|
||||
model = models.Template
|
||||
exclude = ("service_id", "jobs", "service_letter_contact_id")
|
||||
|
||||
Reference in New Issue
Block a user