Skip to content

Commit

Permalink
Merge pull request #565 from DesiPilla/fix-standings-bug
Browse files Browse the repository at this point in the history
fix: Return empty standings prior to Week 1
  • Loading branch information
cwendt94 authored Sep 9, 2024
2 parents 428d155 + cc38058 commit c2bbc7d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions espn_api/football/league.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def standings_weekly(self, week: int) -> List[Team]:
Returns:
List[Dict]: Sorted standings list
"""
# Return empty standings if no matchup periods have completed yet
if self.currentMatchupPeriod <= 1:
return self.standings()

# Get standings data for each team up to the given week
list_of_team_data = []
for team in self.teams:
Expand Down

0 comments on commit c2bbc7d

Please sign in to comment.