fix Token db interface

This commit is contained in:
wiktr committed 2026-08-28 14:47:52 +02:00
1 parent 0bb7ca21cf
commit 8b94f36db5
1 file changed
+2 -2
+2 -2
View File
@@ -416,7 +416,7 @@ class Token:
def get_user(db_path: str, token: str) -> int: def get_user(db_path: str, token: str) -> int:
if not Token.exists(db_path, userid): if not Token.exists(db_path, token):
raise ValueError("Token does not exist") raise ValueError("Token does not exist")
with sqlite3.connect(db_path) as connection: with sqlite3.connect(db_path) as connection:
@@ -429,4 +429,4 @@ class Token:
WHERE tkhash = ? WHERE tkhash = ?
''', (tkhash, )) ''', (tkhash, ))
return cursor.fetcone()[0] return cursor.fetchone()[0]