diff --git a/app/schemas.py b/app/schemas.py index 17dea94bd..0adb9eea3 100644 --- a/app/schemas.py +++ b/app/schemas.py @@ -346,7 +346,7 @@ class TemplateSchema(BaseTemplateSchema): class TemplateHistorySchema(BaseSchema): - reply_to = fields.Method("get_reply_to", allow_none=True) + reply_to_text = fields.Method("get_reply_to", allow_none=True) created_by = fields.Nested(UserSchema, only=['id', 'name', 'email_address'], dump_only=True) created_at = field_for(models.Template, 'created_at', format='%Y-%m-%d %H:%M:%S.%f') diff --git a/tests/app/template/test_rest_history.py b/tests/app/template/test_rest_history.py index c26c4abc8..4bf97c020 100644 --- a/tests/app/template/test_rest_history.py +++ b/tests/app/template/test_rest_history.py @@ -111,4 +111,4 @@ def test_update_template_reply_to_updates_history(client, sample_letter_template hist_json_resp = json.loads(resp.get_data(as_text=True)) assert 'service_letter_contact_id' not in hist_json_resp['data'] - assert hist_json_resp['data']['reply_to'] == str(letter_contact.id) + assert hist_json_resp['data']['reply_to_text'] == str(letter_contact.id)