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:
Richard Chapman
2017-10-05 16:29:11 +01:00
parent 7974e59eb7
commit 068ecd80a1
2 changed files with 11 additions and 10 deletions

View File

@@ -28,8 +28,13 @@ from app.models import (
Notification,
NotificationHistory,
NotificationStatistics,
Template,
NotificationEmailReplyTo,
ServiceEmailReplyTo,
ScheduledNotification,
Template,
KEY_TYPE_NORMAL,
KEY_TYPE_TEST,
LETTER_TYPE,
NOTIFICATION_CREATED,
NOTIFICATION_DELIVERED,
NOTIFICATION_SENDING,
@@ -37,11 +42,7 @@ from app.models import (
NOTIFICATION_TECHNICAL_FAILURE,
NOTIFICATION_TEMPORARY_FAILURE,
NOTIFICATION_PERMANENT_FAILURE,
KEY_TYPE_NORMAL, KEY_TYPE_TEST,
LETTER_TYPE,
NOTIFICATION_SENT,
NotificationEmailReplyTo,
ServiceEmailReplyTo
NOTIFICATION_SENT
)
from app.dao.dao_utils import transactional

View File

@@ -16,11 +16,11 @@ from app.models import (
)
from app.celery.tasks import update_letter_notifications_to_sent_to_dvla
from app.notifications.process_notifications import (
persist_email_reply_to_id_for_notification,
persist_notification,
send_notification_to_queue,
simulated_recipient,
persist_scheduled_notification,
persist_email_reply_to_id_for_notification
send_notification_to_queue,
simulated_recipient
)
from app.notifications.process_letter_notifications import (
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)
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)
scheduled_for = form.get("scheduled_for", None)