From 8f9a8348daac86208399bf845a4d945314bef1d4 Mon Sep 17 00:00:00 2001 From: Desi Pilla Date: Sun, 3 Dec 2023 20:42:49 -0500 Subject: [PATCH] Update base_league.py --- espn_api/base_league.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/espn_api/base_league.py b/espn_api/base_league.py index 7e228bec..ea456a6f 100644 --- a/espn_api/base_league.py +++ b/espn_api/base_league.py @@ -34,7 +34,9 @@ def _fetch_league(self, SettingsClass = BaseSettings): self.scoringPeriodId = data['scoringPeriodId'] self.firstScoringPeriod = data['status']['firstScoringPeriod'] self.finalScoringPeriod = data['status']['finalScoringPeriod'] - self.previousSeasons = data["status"]["previousSeasons"] + self.previousSeasons = [ + year for year in data["status"]["previousSeasons"] if year < self.year + ] if self.year < 2018: self.current_week = data['scoringPeriodId'] else: