THERE SHOULDN'T BE CONCURRENT BLACKJACK GAMES BY SAME USER

master
Aevann1 2022-09-05 10:59:30 +02:00
parent 919f49ccb2
commit 514e67a454
1 changed files with 1 additions and 1 deletions

View File

@ -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)