store: PR review: major-domo-database#39 — assign order_by() return value in stratgame.py
This commit is contained in:
parent
696b3ac27f
commit
643a9d4c1c
@ -0,0 +1,28 @@
|
||||
---
|
||||
id: 35b13826-2f86-460a-a087-c15ba92a9d3e
|
||||
type: workflow
|
||||
title: "PR review: major-domo-database#39 — assign order_by() return value in stratgame.py"
|
||||
tags: [pr-reviewer, major-domo-database, fastapi, python, peewee, bug-fix, queryset]
|
||||
importance: 0.4
|
||||
confidence: 0.8
|
||||
created: "2026-03-03T01:22:05.056826+00:00"
|
||||
updated: "2026-03-03T01:22:05.056826+00:00"
|
||||
---
|
||||
|
||||
## PR #39 Review — major-domo-database
|
||||
|
||||
**Verdict**: APPROVED
|
||||
|
||||
**File reviewed**: `app/routers_v3/stratgame.py`
|
||||
|
||||
### Bug
|
||||
Peewee's `order_by()` returns a new queryset (immutable chain). Both branches of the sort conditional in `get_games()` discarded the return value, so `GET /api/v3/games` was never actually sorted.
|
||||
|
||||
### Fix
|
||||
Added `all_games =` assignment before both `order_by()` calls (lines 94–97 original). Correct and minimal.
|
||||
|
||||
### Notes
|
||||
- PR also reformats the entire file: single quotes → double quotes, Black-style multi-line params. Cosmetic only.
|
||||
- Pre-existing: `game_num` filter applied twice (idempotent, harmless).
|
||||
- No automated tests exist for this service per CLAUDE.md — manual verification on dev server required.
|
||||
- Could not post as APPROVED (Gitea blocks self-approval); posted as COMMENT instead.
|
||||
Loading…
Reference in New Issue
Block a user