Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
bcollazo committed Mar 19, 2023
1 parent bca911b commit 9b5b93e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions catanatron_server/catanatron_server/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ def post_action_endpoint(game_id):
mimetype="application/json",
)

# TODO: or request.json is None until fully implement actions in FE
if game.state.current_player().is_bot or request.json is None:
# TODO: remove `or body_is_empty` when fully implement actions in FE
body_is_empty = (not request.data) or request.json is None
if game.state.current_player().is_bot or body_is_empty:
game.play_tick()
upsert_game_state(game)
else:
Expand Down

0 comments on commit 9b5b93e

Please sign in to comment.