From ae0dd1819269fb6bf63a28617572874b5e2169d0 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 5 Sep 2022 23:58:46 +0200 Subject: [PATCH] fix 500 error --- files/routes/casino.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/casino.py b/files/routes/casino.py index fe3f8d2d5..d1cbb9bbc 100644 --- a/files/routes/casino.py +++ b/files/routes/casino.py @@ -89,7 +89,9 @@ def player_took_blackjack_action(v): elif existing_game: return { "error": "Cannot start a new game while an existing game persists." } else: - success, game_state = gambler_dealt(v, currency, wager) + deal = gambler_dealt(v, currency, wager) + if not deal: return { "error": "Cannot start a new game while an existing game persists." } + success, game_state = deal was_successful = success state = game_state elif action == 'hit':