From ea8caf1ad9845e2707af900d956b49fb31e8869f Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 11 Jan 2024 09:38:00 -0800 Subject: [PATCH 1/2] remove debugging for 2fa issue --- app/delivery/send_to_providers.py | 5 +---- app/user/rest.py | 22 ---------------------- 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/app/delivery/send_to_providers.py b/app/delivery/send_to_providers.py index 407e39e66..e370a1111 100644 --- a/app/delivery/send_to_providers.py +++ b/app/delivery/send_to_providers.py @@ -82,10 +82,7 @@ def send_sms_to_provider(notification): if my_phone: my_phone = my_phone.decode("utf-8") - # TODO REMOVE - current_app.logger.info( - f"IN SEND TO PROVIDERS, WHERE WE GET THE VALUE, KEY IS {key} and value is {my_phone}" - ) + if my_phone is None: si = notification.service_id ji = notification.job_id diff --git a/app/user/rest.py b/app/user/rest.py index 6cfa8edea..d5746147d 100644 --- a/app/user/rest.py +++ b/app/user/rest.py @@ -351,33 +351,11 @@ def create_2fa_code( reply_to_text=reply_to, ) - current_app.logger.info("TESTING REDIS") - redis_store.raw_set("TESTKEY5", "WORKS") - current_app.logger.info( - f"SHOULD SEE THE WORD 'WORKS' HERE: {redis_store.get('TESTKEY5')}" - ) - key = f"2facode-{saved_notification.id}".replace(" ", "") recipient = str(recipient) - # TODO REMOVE - current_app.logger.info( - f"IN REST, WHERE WE SET THE VALUE, KEY IS {key} and value is {recipient}" - ) redis_store.raw_set(key, recipient) stored_recipient = redis_store.raw_get(key) - # TODO REMOVE - current_app.logger.info( - f"IN REST, WHERE WE GET THE VALUE, KEY IS {key} and value is {stored_recipient}" - ) - if stored_recipient: - current_app.logger.info( - "IN user/rest.py we saved the recipient of the 2facode to redis!" - ) - else: - current_app.logger.info( - "IN user/rest.py we did NOT save the recipient of the 2facode to redis!" - ) # Assume that we never want to observe the Notify service's research mode # setting for this notification - we still need to be able to log into the # admin even if we're doing user research using this service: From a8955ef78fe10de15e375748b8298fcc2e26893e Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 11 Jan 2024 09:50:59 -0800 Subject: [PATCH 2/2] fix flake8 --- app/user/rest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/user/rest.py b/app/user/rest.py index d5746147d..e98151f1e 100644 --- a/app/user/rest.py +++ b/app/user/rest.py @@ -354,7 +354,6 @@ def create_2fa_code( key = f"2facode-{saved_notification.id}".replace(" ", "") recipient = str(recipient) redis_store.raw_set(key, recipient) - stored_recipient = redis_store.raw_get(key) # Assume that we never want to observe the Notify service's research mode # setting for this notification - we still need to be able to log into the