store: PR review: major-domo-database#40 — raise HTTPException in recalculate_standings
This commit is contained in:
parent
f23b4b3f49
commit
a9681cc98a
@ -0,0 +1,32 @@
|
||||
---
|
||||
id: 9dc591ce-c353-4998-889a-40770f77946c
|
||||
type: workflow
|
||||
title: "PR review: major-domo-database#40 — raise HTTPException in recalculate_standings"
|
||||
tags: [pr-reviewer, major-domo-database, fastapi, python, peewee, standings, bug-fix]
|
||||
importance: 0.4
|
||||
confidence: 0.8
|
||||
created: "2026-03-03T01:11:07.751846+00:00"
|
||||
updated: "2026-03-03T01:11:07.751846+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
|
||||
|
||||
1. **Primary fix correct** (`standings.py`): Missing `raise` before `HTTPException` in `recalculate_standings`. Without it, error code 69 from `Standings.recalculate()` was silently swallowed and HTTP 200 returned. One-word fix, unambiguous.
|
||||
|
||||
2. **Undocumented secondary fix** (`stratgame.py`): In `get_games()`, both `order_by()` calls were not assigned back to `all_games`. Peewee's `order_by()` returns a new query (immutable pattern) — so sorting was silently ignored. The PR correctly fixes this with `all_games = all_games.order_by(...)` but the PR description only mentions `standings.py`.
|
||||
|
||||
3. **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: `HTTPException` must be `raise`d — constructing without raising is a silent no-op (Python doesn't warn on this)
|
||||
|
||||
### Files Reviewed
|
||||
- `app/routers_v3/standings.py`
|
||||
- `app/routers_v3/stratgame.py`
|
||||
Loading…
Reference in New Issue
Block a user