Skip to content

Commit

Permalink
Fix user identification in UserCRUD class
Browse files Browse the repository at this point in the history
  • Loading branch information
MU-Software committed Jan 28, 2024
1 parent 4252743 commit 954c5a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/crud/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ async def signin(self, session: db_types.As, user_ident: str, password: str) ->
column, user_ident = user_model.User.username, user_ident[1:]
elif "@" in user_ident and string_util.is_email(user_ident):
column, user_ident = user_model.User.email, user_ident
column, user_ident = user_model.User.username, user_ident
else:
column, user_ident = user_model.User.username, user_ident

stmt = sa.select(self.model).where(column == user_ident)

Expand Down

0 comments on commit 954c5a8

Please sign in to comment.