diff --git a/app/db_engine.py b/app/db_engine.py index 1ecb218..3b7af32 100644 --- a/app/db_engine.py +++ b/app/db_engine.py @@ -1326,7 +1326,8 @@ class Standings(BaseModel): # Iterate through each individual result # for game in Result.select_season(season).where(Result.week <= 22): for game in StratGame.select().where( - (StratGame.season == season) & (StratGame.week <= 18) & (StratGame.game_num.is_null(False))): + (StratGame.season == season) & (StratGame.week <= 18) & (StratGame.game_num.is_null(False)) + ).order_by(StratGame.week, StratGame.game_num): # tally win and loss for each standings object game.update_standings()