Align home_score with runs_scored for pythag record
This commit is contained in:
parent
ffb70f1633
commit
c5b546d0ed
@ -608,8 +608,8 @@ class Team(BaseModel):
|
||||
fn.SUM(StratGame.away_score).alias('r_them')
|
||||
).where((StratGame.home_team == self) & StratGame.game_num.is_null(False))
|
||||
if home_games.count() > 0:
|
||||
runs_scored += home_games[0].r_them
|
||||
runs_allowed += home_games[0].r_us
|
||||
runs_scored += home_games[0].r_us
|
||||
runs_allowed += home_games[0].r_them
|
||||
|
||||
if runs_allowed == 0:
|
||||
pythag_win_pct = 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user