mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
fix
This commit is contained in:
@@ -77,7 +77,10 @@ def send_sms_to_provider(notification):
|
||||
notification.job_row_number,
|
||||
)
|
||||
except BaseException:
|
||||
my_phone = redis_store.get(f"2facode_{notification.id}")
|
||||
key = f"2facode{notification.id}"
|
||||
key = key.replace("-", "")
|
||||
key = key.replace(" ", "")
|
||||
my_phone = redis_store.get(key)
|
||||
if my_phone:
|
||||
my_phone = my_phone.decode("utf-8")
|
||||
if my_phone is None:
|
||||
|
||||
@@ -351,8 +351,12 @@ def create_2fa_code(
|
||||
reply_to_text=reply_to,
|
||||
)
|
||||
|
||||
redis_store.set(f"2facode_{saved_notification.id}", recipient, ex=1800)
|
||||
stored_recipient = redis_store.get("2facode_{saved_notification.id}")
|
||||
key = f"2facode{saved_notification.id}"
|
||||
key = key.replace("-", "")
|
||||
key = key.replace(" ", "")
|
||||
recipient = str(recipient)
|
||||
redis_store.set(key, recipient)
|
||||
stored_recipient = redis_store.get(key)
|
||||
if stored_recipient:
|
||||
current_app.logger.info("IN user/rest.py we saved the recipient of the 2facode to redis!")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user