Skip to content

Commit 9aeda0f

Browse files
committed
Fix KeyError : 'eliminationNumber' in standings_data
statsapi.standings(leagueId="103,104", season=2023, standingsTypes='springTraining') can now return data instead of throwing KeyError: 'eliminationNumber'
1 parent ecf58c8 commit 9aeda0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

statsapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1493,7 +1493,7 @@ def standings_data(
14931493
"wc_rank": x.get("wildCardRank", "-"),
14941494
"wc_gb": x.get("wildCardGamesBack", "-"),
14951495
"wc_elim_num": x.get("wildCardEliminationNumber", "-"),
1496-
"elim_num": x["eliminationNumber"],
1496+
"elim_num": x.get("eliminationNumber", "-"),
14971497
"team_id": x["team"]["id"],
14981498
"league_rank": x["leagueRank"],
14991499
"sport_rank": x["sportRank"],

0 commit comments

Comments
 (0)