forked from MarseyWorld/MarseyWorld
try fixing blackjack
parent
225e64b91e
commit
e554f0924b
|
@ -48,11 +48,10 @@ def save_game_state(game, new_state):
|
||||||
|
|
||||||
|
|
||||||
def get_active_game(gambler):
|
def get_active_game(gambler):
|
||||||
g.db.flush()
|
|
||||||
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).one_or_none()
|
Casino_Game.user_id == gambler.id).first()
|
||||||
|
|
||||||
if game:
|
if game:
|
||||||
return game, json.loads(game.game_state)
|
return game, json.loads(game.game_state)
|
||||||
|
|
Loading…
Reference in New Issue