Merge pull request 'fix: season-stats update-game returns 404 for nonexistent game_id' (#117) from ai/paper-dynasty-database#113 into next-release
Some checks failed
Build Docker Image / build (push) Has been cancelled
Some checks failed
Build Docker Image / build (push) Has been cancelled
Reviewed-on: #117
This commit is contained in:
commit
a81bde004b
@ -52,9 +52,12 @@ async def update_game_season_stats(
|
||||
raise HTTPException(status_code=401, detail="Unauthorized")
|
||||
|
||||
from ..services.season_stats import update_season_stats
|
||||
from ..db_engine import DoesNotExist
|
||||
|
||||
try:
|
||||
result = update_season_stats(game_id, force=force)
|
||||
except DoesNotExist:
|
||||
raise HTTPException(status_code=404, detail=f"Game {game_id} not found")
|
||||
except Exception as exc:
|
||||
logger.error("update-game/%d failed: %s", game_id, exc, exc_info=True)
|
||||
raise HTTPException(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user