Skip to content

Commit

Permalink
fix: login for new user (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
cabreraalex authored Sep 12, 2023
1 parent d4688b2 commit 4ebfde2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/zeno_backend/database/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ def user(name: str) -> User | None:
user = db.connect_execute_return(
"SELECT id, name FROM users WHERE name = %s", [name]
)
if len(user) is None:
if len(user) == 0:
return None
user = user[0]
return User(
Expand Down

0 comments on commit 4ebfde2

Please sign in to comment.