From 10a0e54c33d486bbfcf21ffcb5c6f5cde7ab56e1 Mon Sep 17 00:00:00 2001
From: Reid 'arrdem' McKenzie <me@arrdem.com>
Date: Thu, 22 Jun 2023 15:01:21 -0600
Subject: [PATCH] Fix: if the login attempt failed, return None

---
 projects/tentacles/src/python/tentacles/db.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/projects/tentacles/src/python/tentacles/db.py b/projects/tentacles/src/python/tentacles/db.py
index 6126c51..30f4547 100644
--- a/projects/tentacles/src/python/tentacles/db.py
+++ b/projects/tentacles/src/python/tentacles/db.py
@@ -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)