From e554f0924bb37a7e4045140ef92c9028495f88e2 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 5 Sep 2022 07:15:42 +0200 Subject: [PATCH] try fixing blackjack --- files/helpers/blackjack.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/files/helpers/blackjack.py b/files/helpers/blackjack.py index e2205d4c8..c438bf543 100644 --- a/files/helpers/blackjack.py +++ b/files/helpers/blackjack.py @@ -48,11 +48,10 @@ def save_game_state(game, new_state): def get_active_game(gambler): - g.db.flush() game = g.db.query(Casino_Game) \ .filter(Casino_Game.active == True, Casino_Game.kind == 'blackjack', - Casino_Game.user_id == gambler.id).one_or_none() + Casino_Game.user_id == gambler.id).first() if game: return game, json.loads(game.game_state)