fix: raise HTTPException in recalculate_standings on failure (#23) #41
@ -121,5 +121,5 @@ async def recalculate_standings(season: int, token: str = Depends(oauth2_scheme)
|
|||||||
code = Standings.recalculate(season)
|
code = Standings.recalculate(season)
|
||||||
db.close()
|
db.close()
|
||||||
if code == 69:
|
if code == 69:
|
||||||
HTTPException(status_code=500, detail=f'Error recreating Standings rows')
|
raise HTTPException(status_code=500, detail=f'Error recreating Standings rows')
|
||||||
return f'Just recalculated standings for season {season}'
|
return f'Just recalculated standings for season {season}'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user