Changes after review. Updates to style and import order to be more consistent with other code.

Added clarification to an error message to give better debugging information.
Removed using dao_get_reply_to_by_service_id in tests to be more consistent with other code and use the test db functions or remove the need for a call altogether making the code less complex.
This commit is contained in:
Richard Chapman
2017-10-05 13:22:00 +01:00
parent d2168b7985
commit 7974e59eb7
6 changed files with 53 additions and 61 deletions

View File

@@ -140,5 +140,6 @@ def check_service_email_reply_to_id(service_id, reply_to_id):
try:
reply_to = dao_get_reply_to_by_id(service_id, reply_to_id)
except NoResultFound:
message = 'email_reply_to_id does not exist in database'
message = 'email_reply_to_id {} does not exist in database for service id {}'\
.format(reply_to_id, service_id)
raise BadRequestError(message=message)