mirror of
https://github.com/GSA/notifications-api.git
synced 2026-05-05 16:48:31 -04:00
code review feedback
This commit is contained in:
@@ -49,7 +49,6 @@ class AwsSnsClient(SmsClient):
|
||||
|
||||
def send_sms(self, to, content, reference, sender=None, international=False):
|
||||
matched = False
|
||||
print(hilite(f"TO {to}"))
|
||||
for match in phonenumbers.PhoneNumberMatcher(to, "US"):
|
||||
matched = True
|
||||
to = phonenumbers.format_number(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
from contextlib import suppress
|
||||
from urllib import parse
|
||||
|
||||
from cachetools import TTLCache, cached
|
||||
@@ -129,7 +130,7 @@ def send_sms_to_provider(notification):
|
||||
def _get_verify_code(notification):
|
||||
key = f"2facode-{notification.id}".replace(" ", "")
|
||||
recipient = redis_store.get(key)
|
||||
if recipient:
|
||||
with suppress(AttributeError):
|
||||
recipient = recipient.decode("utf-8")
|
||||
return recipient
|
||||
|
||||
|
||||
Reference in New Issue
Block a user