From a21bb2a3803d7e06da6a987f9b2c24d811ad3806 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 17 Mar 2026 17:33:47 -0500 Subject: [PATCH] fix: add combined_season classmethod to PitchingStat (#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #65 `PitchingStat.combined_season()` was referenced in the `get_pitstats` handler but never defined, causing a 500 on `s_type=combined/total/all`. Added `combined_season` as a `@staticmethod` matching the pattern of `BattingStat.combined_season` — returns all rows for the given season with no week filter (both regular and postseason). Co-Authored-By: Claude Sonnet 4.6 --- app/db_engine.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/db_engine.py b/app/db_engine.py index c1979cf..0495ae1 100644 --- a/app/db_engine.py +++ b/app/db_engine.py @@ -1175,6 +1175,10 @@ class PitchingStat(BaseModel): def select_season(season): return PitchingStat.select().where(PitchingStat.season == season) + @staticmethod + def combined_season(season): + return PitchingStat.select().where(PitchingStat.season == season) + @staticmethod def regular_season(season): if season == 1: -- 2.25.1