fix: PitchingStat model missing combined_season attribute (500 on s_type=combined) #65
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#65
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
GET /api/v3/pitchingstats?s_type=combinedreturns 500 in both dev and production.Error
Reproduction
s_type=regularands_type=postwork correctly. Onlycombined/total/allpaths fail.Root Cause
In
app/routers_v3/pitchingstats.py, theget_pitstatshandler branches ons_type:PitchingStat.combined_season()is referenced but never defined on the model.regular_seasonandpost_seasonexist;combined_seasondoes not.Fix
Add a
combined_seasonclassmethod to thePitchingStatmodel that unions regular and postseason stats for the given season, matching the pattern ofregular_seasonandpost_season.Discovered
Post-deploy smoke test against production — 2026-03-17.
PR opened: #67
Added
combined_seasonas a@staticmethodtoPitchingStatinapp/db_engine.py(+4 lines). The method mirrorsBattingStat.combined_season— returns all rows for the given season with no week filter, covering both regular and postseason weeks. This resolves theAttributeErrorons_type=combined/total/all.