"mmdet/vscode:/vscode.git/clone" did not exist on "5bf935e1b7621b234ddb34ef6c32b2b524243995"
Commit 7385016e authored by Jun Siang Cheah's avatar Jun Siang Cheah
Browse files

fix: only get user by emails without oauth sub

parent b3557d05
......@@ -114,7 +114,7 @@ class UsersTable:
def get_user_by_email(self, email: str) -> Optional[UserModel]:
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))
except:
return None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment