mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-14 17:22:17 -05:00
make persist_notification require kwargs
when functions get as big as that, it's confusing to try and work out what things are what. By including a * as the first arg, we require that anyone calling the function has to use kwargs to reference the parameters
This commit is contained in:
@@ -9,7 +9,7 @@ from notifications_utils.clients.redis import rate_limit_cache_key, daily_limit_
|
||||
|
||||
from app.dao import services_dao, templates_dao
|
||||
from app.models import (
|
||||
INTERNATIONAL_SMS_TYPE, SMS_TYPE,
|
||||
INTERNATIONAL_SMS_TYPE, SMS_TYPE, EMAIL_TYPE,
|
||||
KEY_TYPE_TEST, KEY_TYPE_TEAM, SCHEDULE_NOTIFICATIONS
|
||||
)
|
||||
from app.service.utils import service_allowed_to_send_to
|
||||
@@ -104,7 +104,7 @@ def validate_and_format_recipient(send_to, key_type, service, notification_type)
|
||||
number=send_to,
|
||||
international=international_phone_info.international
|
||||
)
|
||||
else:
|
||||
elif notification_type == EMAIL_TYPE:
|
||||
return validate_and_format_email_address(email_address=send_to)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user