From 8044c1cae742a9180e0d1fe6956b2a8728549219 Mon Sep 17 00:00:00 2001 From: kevroded Date: Wed, 6 Jan 2021 01:24:03 -0500 Subject: [PATCH] New attempt to fix game history saving multiple times --- main_controller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main_controller.py b/main_controller.py index 31efe82..04948cb 100644 --- a/main_controller.py +++ b/main_controller.py @@ -70,12 +70,15 @@ def update_loop(): if this_game.victory_lap and winning_team == this_game.teams['home'].name: state["update_text"] = f"{winning_team} wins with a victory lap!" db.cache_history(this_game.teams['home'].name, this_game.teams["home"].score, this_game.teams['away'].name, this_game.teams['away'].score, this_game.weather.name) + break elif winning_team == this_game.teams['home'].name: state["update_text"] = f"{winning_team} wins, shaming {this_game.teams['away'].name}!" db.cache_history(this_game.teams['home'].name, this_game.teams["home"].score, this_game.teams['away'].name, this_game.teams['away'].score, this_game.weather.name) + break else: state["update_text"] = f"{winning_team} wins!" db.cache_history(this_game.teams['home'].name, this_game.teams["home"].score, this_game.teams['away'].name, this_game.teams['away'].score, this_game.weather.name) + break state["pitcher"] = "-" state["batter"] = "-" elif this_game.top_of_inning: