diff --git a/espn_api/base_league.py b/espn_api/base_league.py index 1e26524b..a53181e8 100644 --- a/espn_api/base_league.py +++ b/espn_api/base_league.py @@ -82,7 +82,7 @@ def _fetch_teams(self, data, TeamClass, pro_schedule = None): for team in teams: roster = team_roster[team['id']] - owners = [member for member in members if member.get('id') == (team.get('owners') or [''])[0]] + owners = [member for member in members if member.get('id') in team.get('owners', [])] self.teams.append(TeamClass(team, roster=roster, schedule=schedule, year=seasonId, owners=owners, pro_schedule=pro_schedule)) # sort by team ID