diff --git a/app/services/season_stats.py b/app/services/season_stats.py index 991bfa5..bf0e06e 100644 --- a/app/services/season_stats.py +++ b/app/services/season_stats.py @@ -76,7 +76,8 @@ def _get_player_pairs(game_id: int) -> tuple[set, set]: for batter_id, batter_team_id, pitcher_id, pitcher_team_id in plays: if batter_id is not None: batting_pairs.add((batter_id, batter_team_id)) - pitching_pairs.add((pitcher_id, pitcher_team_id)) + if pitcher_id is not None: + pitching_pairs.add((pitcher_id, pitcher_team_id)) # Include pitchers who have a Decision but no StratPlay rows for this game # (rare edge case, e.g. a pitcher credited with a decision without recording