From 514e67a454e47922de01803ed194721b81722eb7 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 5 Sep 2022 10:59:30 +0200 Subject: [PATCH] THERE SHOULDN'T BE CONCURRENT BLACKJACK GAMES BY SAME USER --- files/helpers/blackjack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/helpers/blackjack.py b/files/helpers/blackjack.py index 6b3121e1d..ee6d17b86 100644 --- a/files/helpers/blackjack.py +++ b/files/helpers/blackjack.py @@ -51,7 +51,7 @@ def get_active_game(gambler): game = g.db.query(Casino_Game) \ .filter(Casino_Game.active == True, Casino_Game.kind == 'blackjack', - Casino_Game.user_id == gambler.id).first() + Casino_Game.user_id == gambler.id).one_or_none() if game: return game, json.loads(game.game_state)