mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-02 09:26:08 -05:00
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:
@@ -40,7 +40,9 @@ from app.models import (
|
||||
KEY_TYPE_NORMAL, KEY_TYPE_TEST,
|
||||
LETTER_TYPE,
|
||||
NOTIFICATION_SENT,
|
||||
NotificationEmailReplyTo, ServiceEmailReplyTo)
|
||||
NotificationEmailReplyTo,
|
||||
ServiceEmailReplyTo
|
||||
)
|
||||
|
||||
from app.dao.dao_utils import transactional
|
||||
from app.statsd_decorators import statsd
|
||||
@@ -619,7 +621,7 @@ def dao_get_notification_email_reply_for_notification(notification_id):
|
||||
NotificationEmailReplyTo
|
||||
).filter(
|
||||
NotificationEmailReplyTo.notification_id == notification_id
|
||||
).all()
|
||||
).first()
|
||||
|
||||
if len(email_reply_to) == 1:
|
||||
return email_reply_to[0].email_address
|
||||
if email_reply_to:
|
||||
return email_reply_to.email_address
|
||||
|
||||
Reference in New Issue
Block a user