Tweak limits again
This commit is contained in:
parent
8ea69e73b6
commit
5fbcbbe725
8
main.py
8
main.py
@ -1829,8 +1829,8 @@ async def v1_battingstats_get(
|
||||
db.close()
|
||||
raise HTTPException(status_code=404,
|
||||
detail=f'Start week {start} is after end week {end} - cannot pull stats')
|
||||
# if start + 5 < end and not csv:
|
||||
# start = end - 5
|
||||
if start + 5 < end and team_abbrev is None and player_name is None and player_id is None and not csv:
|
||||
start = end - 5
|
||||
|
||||
logging.info(f'\n\nweek_start: {week_start} / week_end: {week_end} / game_num: {game_num} / '
|
||||
f'start: {start} / end: {end}')
|
||||
@ -2287,7 +2287,7 @@ async def v1_pitchingstat_get(
|
||||
db.close()
|
||||
raise HTTPException(status_code=404,
|
||||
detail=f'Start week {start} is after end week {end} - cannot pull stats')
|
||||
if start + 5 < end:
|
||||
if start + 5 < end and team_abbrev is None and player_name is None and player_id is None and not csv:
|
||||
start = end - 5
|
||||
|
||||
all_stats = all_stats.where(
|
||||
@ -2647,7 +2647,7 @@ async def v1_fieldingstats_get(
|
||||
db.close()
|
||||
raise HTTPException(status_code=404,
|
||||
detail=f'Start week {start} is after end week {end} - cannot pull stats')
|
||||
if start + 5 < end:
|
||||
if start + 5 < end and team_abbrev is None and player_name is None and player_id is None and not csv:
|
||||
start = end - 5
|
||||
|
||||
all_stats = all_stats.where(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user