Skip to content

Commit

Permalink
Fix json team_players
Browse files Browse the repository at this point in the history
  • Loading branch information
Saturn committed Jan 14, 2019
1 parent 46e6485 commit 704f292
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions soccer/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def standings(self, league_table, league):

def team_players(self, team):
"""Store output of team players to a JSON file"""
keys = 'jerseyNumber name position nationality dateOfBirth marketValue'.split()
data = [{key: player[key] for key in keys} for player in team['players']]
keys = 'shirtNumber name position nationality dateOfBirth'.split()
data = [{key: player[key] for key in keys} for player in team]
self.generate_output({'players': data})

def league_scores(self, total_data, time):
Expand Down

0 comments on commit 704f292

Please sign in to comment.