From d9c9dad90560a7747aa410f295bfdf19f27cb89a Mon Sep 17 00:00:00 2001 From: iamBadgers Date: Tue, 24 Mar 2026 01:16:58 -0700 Subject: [PATCH] close, but more --- src/key_tables.py | 2 +- src/main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/key_tables.py b/src/key_tables.py index 3b1740d..53dd564 100644 --- a/src/key_tables.py +++ b/src/key_tables.py @@ -59,7 +59,7 @@ def get_key_for_table(game_table_id, cursor): ) row = cursor.fetchone() - if len(row) == 0: + if row == None: return None return KeyTable(row[0], row[1]) diff --git a/src/main.py b/src/main.py index 0df2366..15b3ce9 100644 --- a/src/main.py +++ b/src/main.py @@ -103,9 +103,9 @@ def deactivate_table(table_id): table.active = False if key != None: key.release() + key.commit(cursor) table.commit(cursor) - key.commit(cursor) cursor.close() db.commit() return jsonify(table.toJson())