New attempt to fix game history saving multiple times
This commit is contained in:
parent
97f125c55e
commit
8044c1cae7
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user