From fb79e689f81b2cc435dfdd999f2f72cdbde09b32 Mon Sep 17 00:00:00 2001 From: Muneeb Shahid Date: Wed, 1 May 2024 23:06:56 -0700 Subject: [PATCH] refactor(account): Refactor email verification method in account utils #1946 --- allauth/account/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/allauth/account/utils.py b/allauth/account/utils.py index b3faa566e5..aaaea74dca 100644 --- a/allauth/account/utils.py +++ b/allauth/account/utils.py @@ -499,7 +499,6 @@ def assess_unique_email(email) -> Optional[bool]: False -- email is already in use None -- email is in use, but we should hide that using email verification. """ - adapter = get_adapter() if not filter_users_by_email(email): # All good. return True @@ -507,7 +506,7 @@ def assess_unique_email(email) -> Optional[bool]: # Fail right away. return False elif ( - adapter.get_email_verification_method() + get_adapter().get_email_verification_method() == app_settings.EmailVerificationMethod.MANDATORY ): # In case of mandatory verification and enumeration prevention,