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)