Skip to content

Commit

Permalink
in init call fetch league
Browse files Browse the repository at this point in the history
  • Loading branch information
cwendt94 committed Feb 23, 2024
1 parent db66d5f commit 1172ccc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions espn_api/baseball/league.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ def __init__(self, league_id: int, year: int, espn_s2=None, swid=None, fetch_lea
self._box_score_class = None

if fetch_league:
data = self._fetch_league()
self.scoring_type = data['settings']['scoringSettings']['scoringType']
self._fetch_teams(data)

self.fetch_league()
if self._box_score_class is None:
self._box_score_class = self._set_scoring_class(self.scoring_type)

Expand Down

0 comments on commit 1172ccc

Please sign in to comment.