Improve the logging message

This commit is contained in:
Rebecca Law
2016-07-01 14:42:40 +01:00
parent f52755742c
commit 3aff22cf87
2 changed files with 3 additions and 7 deletions

View File

@@ -162,12 +162,8 @@ def send_email(self, service_id, notification_id, encrypted_notification, create
notification = encryption.decrypt(encrypted_notification)
service = dao_fetch_service_by_id(service_id)
provider = provider_to_use(EMAIL_TYPE, notification_id)
if not service_allowed_to_send_to(notification['to'], service):
current_app.logger.info(
"Email {} failed as restricted service".format(notification_id)
)
current_app.logger.info("Email {} failed as restricted service".format(notification_id))
return
try: