This commit is contained in:
Rebecca Law
2017-11-23 14:55:49 +00:00
committed by Katie Smith
parent 80db78e7a5
commit 75d99ea397
7 changed files with 70 additions and 16 deletions

View File

@@ -54,7 +54,8 @@ def persist_notification(
notification_id=None,
simulated=False,
created_by_id=None,
status=NOTIFICATION_CREATED
status=NOTIFICATION_CREATED,
reply_to_text=None
):
notification_created_at = created_at or datetime.utcnow()
if not notification_id:
@@ -76,7 +77,8 @@ def persist_notification(
client_reference=client_reference,
reference=reference,
created_by_id=created_by_id,
status=status
status=status,
reply_to_text=reply_to_text,
)
if notification_type == SMS_TYPE:

View File

@@ -142,7 +142,7 @@ def check_service_email_reply_to_id(service_id, reply_to_id, notification_type):
message = 'email_reply_to_id is not a valid option for {} notification'.format(notification_type)
raise BadRequestError(message=message)
try:
dao_get_reply_to_by_id(service_id, reply_to_id)
return dao_get_reply_to_by_id(service_id, reply_to_id).email_address
except NoResultFound:
message = 'email_reply_to_id {} does not exist in database for service id {}'\
.format(reply_to_id, service_id)