Skip to content

Commit

Permalink
Merge pull request #158 from cwendt94/Playoffs2WeekPeriod
Browse files Browse the repository at this point in the history
2 Week Playoff Matchup Period
  • Loading branch information
cwendt94 authored Dec 15, 2020
2 parents 21feaeb + 5246642 commit 6d04b8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion espn_api/base_league.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _fetch_league(self, SettingsClass = BaseSettings):
if self.year < 2018:
self.current_week = data['scoringPeriodId']
else:
self.current_week = self.scoringPeriodId if self.scoringPeriodId <= data['status']['finalScoringPeriod'] else data['status']['finalScoringPeriod']
self.current_week = self.scoringPeriodId if self.scoringPeriodId <= self.currentMatchupPeriod else self.currentMatchupPeriod
self.settings = SettingsClass(data['settings'])
return data

Expand Down
2 changes: 1 addition & 1 deletion tests/football/integration/test_league.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class LeagueTest(TestCase):
def test_league_init(self):
league = League(1234, 2018)

self.assertEqual(league.current_week, 17)
self.assertEqual(league.current_week, 15)

def test_past_league(self):
league = League(12345, 2017)
Expand Down

0 comments on commit 6d04b8a

Please sign in to comment.