forked from MarseyWorld/MarseyWorld
THERE SHOULDN'T BE CONCURRENT BLACKJACK GAMES BY SAME USER
parent
919f49ccb2
commit
514e67a454
|
@ -51,7 +51,7 @@ def get_active_game(gambler):
|
||||||
game = g.db.query(Casino_Game) \
|
game = g.db.query(Casino_Game) \
|
||||||
.filter(Casino_Game.active == True,
|
.filter(Casino_Game.active == True,
|
||||||
Casino_Game.kind == 'blackjack',
|
Casino_Game.kind == 'blackjack',
|
||||||
Casino_Game.user_id == gambler.id).first()
|
Casino_Game.user_id == gambler.id).one_or_none()
|
||||||
|
|
||||||
if game:
|
if game:
|
||||||
return game, json.loads(game.game_state)
|
return game, json.loads(game.game_state)
|
||||||
|
|
Loading…
Reference in New Issue