2.0 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 9dc591ce-c353-4998-889a-40770f77946c | workflow | PR review: major-domo-database#40 — raise HTTPException in recalculate_standings |
|
0.4 | 0.8 | 2026-03-03T01:11:07.751846+00:00 | 2026-03-03T01:11:08.100798+00:00 |
|
PR Review: major-domo-database#40
Verdict: APPROVED (posted as COMMENT — Gitea blocks self-approval)
Branch: ai/major-domo-database-23 → main
Key Findings
-
Primary fix correct (
standings.py): MissingraisebeforeHTTPExceptioninrecalculate_standings. Without it, error code 69 fromStandings.recalculate()was silently swallowed and HTTP 200 returned. One-word fix, unambiguous. -
Undocumented secondary fix (
stratgame.py): Inget_games(), bothorder_by()calls were not assigned back toall_games. Peewee'sorder_by()returns a new query (immutable pattern) — so sorting was silently ignored. The PR correctly fixes this withall_games = all_games.order_by(...)but the PR description only mentionsstandings.py. -
Extensive reformatting in both files: single → double quotes, line wrapping. Cosmetic but consistent.
Patterns Noted
- Peewee ORM:
order_by()does NOT mutate — must assign result back - FastAPI:
HTTPExceptionmust beraised — constructing without raising is a silent no-op (Python doesn't warn on this)
Files Reviewed
app/routers_v3/standings.pyapp/routers_v3/stratgame.py