mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 06:21:50 -05:00
Persist normalised email
This commit is contained in:
@@ -4,7 +4,8 @@ from flask import current_app
|
||||
|
||||
from notifications_utils.recipients import (
|
||||
get_international_phone_info,
|
||||
validate_and_format_phone_number
|
||||
validate_and_format_phone_number,
|
||||
format_email_address
|
||||
)
|
||||
|
||||
from app import redis_store
|
||||
@@ -76,6 +77,8 @@ def persist_notification(
|
||||
notification.international = recipient_info.international
|
||||
notification.phone_prefix = recipient_info.country_prefix
|
||||
notification.rate_multiplier = recipient_info.billable_units
|
||||
elif notification_type == EMAIL_TYPE:
|
||||
notification.normalised_to = format_email_address(notification.to)
|
||||
|
||||
# if simulated create a Notification model to return but do not persist the Notification to the dB
|
||||
if not simulated:
|
||||
|
||||
Reference in New Issue
Block a user