code review feedback

This commit is contained in:
Kenneth Kehl
2024-08-20 10:29:19 -07:00
parent e0404977c0
commit 5c3b96123a
2 changed files with 2 additions and 2 deletions

View File

@@ -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