diff --git a/graph/workflows/pr-review-major-domo-database39-assign-order-by-return-value-35b138.md b/graph/workflows/pr-review-major-domo-database39-assign-order-by-return-value-35b138.md new file mode 100644 index 00000000000..761c3408e1b --- /dev/null +++ b/graph/workflows/pr-review-major-domo-database39-assign-order-by-return-value-35b138.md @@ -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.