mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 10:12:32 -05:00
try to fix tests
This commit is contained in:
@@ -274,7 +274,7 @@ def save_email(
|
|||||||
"Email {} failed as restricted service".format(notification_id)
|
"Email {} failed as restricted service".format(notification_id)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
original_notification = get_notification(notification_id)
|
||||||
try:
|
try:
|
||||||
saved_notification = persist_notification(
|
saved_notification = persist_notification(
|
||||||
template_id=notification["template"],
|
template_id=notification["template"],
|
||||||
@@ -291,10 +291,11 @@ def save_email(
|
|||||||
notification_id=notification_id,
|
notification_id=notification_id,
|
||||||
reply_to_text=reply_to_text,
|
reply_to_text=reply_to_text,
|
||||||
)
|
)
|
||||||
|
# we only want to send once
|
||||||
provider_tasks.deliver_email.apply_async(
|
if original_notification is None:
|
||||||
[str(saved_notification.id)], queue=QueueNames.SEND_EMAIL
|
provider_tasks.deliver_email.apply_async(
|
||||||
)
|
[str(saved_notification.id)], queue=QueueNames.SEND_EMAIL
|
||||||
|
)
|
||||||
|
|
||||||
current_app.logger.debug(
|
current_app.logger.debug(
|
||||||
"Email {} created at {}".format(
|
"Email {} created at {}".format(
|
||||||
|
|||||||
Reference in New Issue
Block a user