mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 09:51:11 -05:00
Changes after review. Style changes to ensure consistency with the rest of the code base to ensure good maintainability in future.
This commit is contained in:
@@ -28,8 +28,13 @@ from app.models import (
|
|||||||
Notification,
|
Notification,
|
||||||
NotificationHistory,
|
NotificationHistory,
|
||||||
NotificationStatistics,
|
NotificationStatistics,
|
||||||
Template,
|
NotificationEmailReplyTo,
|
||||||
|
ServiceEmailReplyTo,
|
||||||
ScheduledNotification,
|
ScheduledNotification,
|
||||||
|
Template,
|
||||||
|
KEY_TYPE_NORMAL,
|
||||||
|
KEY_TYPE_TEST,
|
||||||
|
LETTER_TYPE,
|
||||||
NOTIFICATION_CREATED,
|
NOTIFICATION_CREATED,
|
||||||
NOTIFICATION_DELIVERED,
|
NOTIFICATION_DELIVERED,
|
||||||
NOTIFICATION_SENDING,
|
NOTIFICATION_SENDING,
|
||||||
@@ -37,11 +42,7 @@ from app.models import (
|
|||||||
NOTIFICATION_TECHNICAL_FAILURE,
|
NOTIFICATION_TECHNICAL_FAILURE,
|
||||||
NOTIFICATION_TEMPORARY_FAILURE,
|
NOTIFICATION_TEMPORARY_FAILURE,
|
||||||
NOTIFICATION_PERMANENT_FAILURE,
|
NOTIFICATION_PERMANENT_FAILURE,
|
||||||
KEY_TYPE_NORMAL, KEY_TYPE_TEST,
|
NOTIFICATION_SENT
|
||||||
LETTER_TYPE,
|
|
||||||
NOTIFICATION_SENT,
|
|
||||||
NotificationEmailReplyTo,
|
|
||||||
ServiceEmailReplyTo
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from app.dao.dao_utils import transactional
|
from app.dao.dao_utils import transactional
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ from app.models import (
|
|||||||
)
|
)
|
||||||
from app.celery.tasks import update_letter_notifications_to_sent_to_dvla
|
from app.celery.tasks import update_letter_notifications_to_sent_to_dvla
|
||||||
from app.notifications.process_notifications import (
|
from app.notifications.process_notifications import (
|
||||||
|
persist_email_reply_to_id_for_notification,
|
||||||
persist_notification,
|
persist_notification,
|
||||||
send_notification_to_queue,
|
|
||||||
simulated_recipient,
|
|
||||||
persist_scheduled_notification,
|
persist_scheduled_notification,
|
||||||
persist_email_reply_to_id_for_notification
|
send_notification_to_queue,
|
||||||
|
simulated_recipient
|
||||||
)
|
)
|
||||||
from app.notifications.process_letter_notifications import (
|
from app.notifications.process_letter_notifications import (
|
||||||
create_letter_notification
|
create_letter_notification
|
||||||
@@ -143,7 +143,7 @@ def process_sms_or_email_notification(*, form, notification_type, api_key, templ
|
|||||||
)
|
)
|
||||||
|
|
||||||
email_reply_to_id = form.get("email_reply_to_id", None)
|
email_reply_to_id = form.get("email_reply_to_id", None)
|
||||||
if email_reply_to_id is not None:
|
if email_reply_to_id:
|
||||||
persist_email_reply_to_id_for_notification(notification.id, email_reply_to_id)
|
persist_email_reply_to_id_for_notification(notification.id, email_reply_to_id)
|
||||||
|
|
||||||
scheduled_for = form.get("scheduled_for", None)
|
scheduled_for = form.get("scheduled_for", None)
|
||||||
|
|||||||
Reference in New Issue
Block a user