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: ...@@ -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
......
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