Browse Source

Merge pull request #6392 from nodomain/patch-1

fix: boolean values don't need to be accessed by .value
Timothy Jaeryang Baek 6 months ago
parent
commit
9b030f6ad6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      backend/open_webui/utils/oauth.py

+ 2 - 2
backend/open_webui/utils/oauth.py

@@ -162,7 +162,7 @@ class OAuthManager:
 
 
         if not user:
         if not user:
             # If the user does not exist, check if merging is enabled
             # If the user does not exist, check if merging is enabled
-            if auth_manager_config.OAUTH_MERGE_ACCOUNTS_BY_EMAIL.value:
+            if auth_manager_config.OAUTH_MERGE_ACCOUNTS_BY_EMAIL:
                 # Check if the user exists by email
                 # Check if the user exists by email
                 user = Users.get_user_by_email(email)
                 user = Users.get_user_by_email(email)
                 if user:
                 if user:
@@ -176,7 +176,7 @@ class OAuthManager:
 
 
         if not user:
         if not user:
             # If the user does not exist, check if signups are enabled
             # If the user does not exist, check if signups are enabled
-            if auth_manager_config.ENABLE_OAUTH_SIGNUP.value:
+            if auth_manager_config.ENABLE_OAUTH_SIGNUP:
                 # Check if an existing user with the same email already exists
                 # Check if an existing user with the same email already exists
                 existing_user = Users.get_user_by_email(
                 existing_user = Users.get_user_by_email(
                     user_data.get("email", "").lower()
                     user_data.get("email", "").lower()