fix: add combined_season classmethod to PitchingStat (#65)
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m17s
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m17s
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 <noreply@anthropic.com>
This commit is contained in:
parent
da679b6d1a
commit
a21bb2a380
@ -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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user