mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 12:55:19 +00:00
fix: only get user by emails without oauth sub
This commit is contained in:
parent
b3557d05b1
commit
7385016e36
1 changed files with 1 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ class UsersTable:
|
||||||
|
|
||||||
def get_user_by_email(self, email: str) -> Optional[UserModel]:
|
def get_user_by_email(self, email: str) -> Optional[UserModel]:
|
||||||
try:
|
try:
|
||||||
user = User.get(User.email == email)
|
user = User.get(User.email == email and User.oauth_sub.is_null())
|
||||||
return UserModel(**model_to_dict(user))
|
return UserModel(**model_to_dict(user))
|
||||||
except:
|
except:
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue