mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
Stop populating the notification to sender mapping table when creating a notificaiton.
This commit is contained in:
@@ -16,12 +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,
|
||||
persist_scheduled_notification,
|
||||
send_notification_to_queue,
|
||||
simulated_recipient,
|
||||
persist_sms_sender_id_for_notification)
|
||||
simulated_recipient
|
||||
)
|
||||
from app.notifications.process_letter_notifications import (
|
||||
create_letter_notification
|
||||
)
|
||||
@@ -144,8 +143,6 @@ def process_sms_or_email_notification(*, form, notification_type, api_key, templ
|
||||
reply_to_text=reply_to_text
|
||||
)
|
||||
|
||||
persist_sender_to_notification_mapping(form, notification)
|
||||
|
||||
scheduled_for = form.get("scheduled_for", None)
|
||||
if scheduled_for:
|
||||
persist_scheduled_notification(notification.id, form["scheduled_for"])
|
||||
@@ -163,15 +160,6 @@ def process_sms_or_email_notification(*, form, notification_type, api_key, templ
|
||||
return notification
|
||||
|
||||
|
||||
def persist_sender_to_notification_mapping(form, notification):
|
||||
email_reply_to_id = form.get("email_reply_to_id", None)
|
||||
if email_reply_to_id:
|
||||
persist_email_reply_to_id_for_notification(notification.id, email_reply_to_id)
|
||||
sms_sender_id = form.get("sms_sender_id", None)
|
||||
if sms_sender_id:
|
||||
persist_sms_sender_id_for_notification(notification.id, sms_sender_id)
|
||||
|
||||
|
||||
def process_letter_notification(*, letter_data, api_key, template):
|
||||
if api_key.key_type == KEY_TYPE_TEAM:
|
||||
raise BadRequestError(message='Cannot send letters with a team api key', status_code=403)
|
||||
|
||||
Reference in New Issue
Block a user