Fix: if the login attempt failed, return None
This commit is contained in:
parent
3345cee21b
commit
10a0e54c33
1 changed files with 1 additions and 2 deletions
|
@ -173,8 +173,7 @@ class Db(Queries):
|
|||
digest.update(password.encode("utf-8"))
|
||||
res = super().try_login(username=username, hash=digest.hexdigest())
|
||||
if not res:
|
||||
res = self.fetch_user_status(sid=res.status_id)
|
||||
raise LoginError(res.name)
|
||||
return None
|
||||
|
||||
return self.create_key(uid=res.id, name="web session", ttl=ttl)
|
||||
|
||||
|
|
Loading…
Reference in a new issue