Skip to content

Commit 6f61a04

Browse files
authored
Merge pull request #428 from UnravelSports/bug/skc-coach
[Skillcorner BUG] Missing coaches
2 parents 1a2f5c9 + cd19330 commit 6f61a04

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

kloppy/infra/serializers/tracking/skillcorner.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,18 @@ def deserialize(self, inputs: SkillCornerInputs) -> TrackingDataset:
383383
game_id = str(game_id)
384384

385385
home_team_coach = metadata.get("home_team_coach")
386-
if home_team_coach is not None:
387-
home_coach = f"{home_team_coach['first_name']} {home_team_coach['last_name']}"
386+
home_coach = (
387+
f"{home_team_coach['first_name']} {home_team_coach['last_name']}"
388+
if home_team_coach is not None
389+
else None
390+
)
388391

389392
away_team_coach = metadata.get("away_team_coach")
390-
if away_team_coach is not None:
391-
away_coach = f"{away_team_coach['first_name']} {away_team_coach['last_name']}"
393+
away_coach = (
394+
f"{away_team_coach['first_name']} {away_team_coach['last_name']}"
395+
if away_team_coach is not None
396+
else None
397+
)
392398

393399
if game_id:
394400
game_id = str(game_id)

0 commit comments

Comments
 (0)