From ba5aed0fa9fd20d0d4263132e7769bf6fd690e1b Mon Sep 17 00:00:00 2001 From: mid-kid Date: Wed, 30 Oct 2024 19:42:49 +0100 Subject: [PATCH] Fix 5 --- auth/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auth/auth.py b/auth/auth.py index 45950c4..7c39754 100644 --- a/auth/auth.py +++ b/auth/auth.py @@ -30,7 +30,7 @@ class Authentication: def check_user(self, profileId, token, user): with self.connect() as con: - with con.cursor() as c: + with contextlib.closing(con.cursor()) as c: res = c.execute("SELECT user FROM users WHERE profileId=?", (profileId,)).fetchone() if res is not None: