Stop populating the notification to sender mapping table when creating a notificaiton.

This commit is contained in:
Rebecca Law
2017-11-29 16:47:23 +00:00
parent 95fd1e8c31
commit 8aa94af5d7
11 changed files with 49 additions and 468 deletions

View File

@@ -13,12 +13,19 @@ from notifications_utils.recipients import (
from app import redis_store
from app.celery import provider_tasks
from app.config import QueueNames
from app.models import SMS_TYPE, Notification, KEY_TYPE_TEST, EMAIL_TYPE, NOTIFICATION_CREATED, ScheduledNotification
from app.dao.notifications_dao import (dao_create_notification,
dao_delete_notifications_and_history_by_id,
dao_created_scheduled_notification,
dao_create_notification_email_reply_to_mapping,
dao_create_notification_sms_sender_mapping)
from app.models import (
EMAIL_TYPE,
KEY_TYPE_TEST,
SMS_TYPE,
NOTIFICATION_CREATED,
Notification,
ScheduledNotification
)
from app.dao.notifications_dao import (
dao_create_notification,
dao_delete_notifications_and_history_by_id,
dao_created_scheduled_notification
)
from app.v2.errors import BadRequestError
from app.utils import get_template_instance, cache_key_for_service_template_counter, convert_bst_to_utc
@@ -145,11 +152,3 @@ def persist_scheduled_notification(notification_id, scheduled_for):
scheduled_notification = ScheduledNotification(notification_id=notification_id,
scheduled_for=scheduled_datetime)
dao_created_scheduled_notification(scheduled_notification)
def persist_email_reply_to_id_for_notification(notification_id, email_reply_to_id):
dao_create_notification_email_reply_to_mapping(notification_id, email_reply_to_id)
def persist_sms_sender_id_for_notification(notification_id, sms_sender_id):
dao_create_notification_sms_sender_mapping(notification_id, sms_sender_id)