From 7065ad55ec58b938f4fdae8b3b0406b87f376340 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 3 Mar 2026 14:03:36 -0600 Subject: [PATCH] =?UTF-8?q?store:=20PR=20review:=20paper-dynasty-database#?= =?UTF-8?q?37=20=E2=80=94=20remove=20dead=20roster=20CSV=20fields?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...base37-remove-dead-roster-csv-fi-961377.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 graph/workflows/pr-review-paper-dynasty-database37-remove-dead-roster-csv-fi-961377.md diff --git a/graph/workflows/pr-review-paper-dynasty-database37-remove-dead-roster-csv-fi-961377.md b/graph/workflows/pr-review-paper-dynasty-database37-remove-dead-roster-csv-fi-961377.md new file mode 100644 index 00000000000..5226e498619 --- /dev/null +++ b/graph/workflows/pr-review-paper-dynasty-database37-remove-dead-roster-csv-fi-961377.md @@ -0,0 +1,30 @@ +--- +id: 96137768-1e1e-4d7c-9890-6443ecd5cc36 +type: workflow +title: "PR review: paper-dynasty-database#37 — remove dead roster CSV fields" +tags: [pr-reviewer, paper-dynasty-database, fastapi, peewee, python, cards-router] +importance: 0.4 +confidence: 0.8 +created: "2026-03-03T20:03:36.362466+00:00" +updated: "2026-03-03T20:03:36.362466+00:00" +--- + +## PR #37: fix: remove dead roster fields from CSV in v1_cards_get_one + +**Verdict**: APPROVED (posted as COMMENT — Gitea blocks self-approval) +**Branch**: ai/paper-dynasty-database-36 (AI-generated) +**File reviewed**: app/routers_v2/cards.py + +### Summary +Removed `roster1`, `roster2`, `roster3` from the CSV output in `v1_cards_get_one`. These fields don't exist on the `Card` model (confirmed in db_engine.py lines 472–491 — only `player`, `team`, `pack`, `value`). Accessing them would raise `AttributeError` on every `GET /api/v2/cards/{card_id}?csv=true` request. + +### Key Findings +- Fix is correct and verified against Card model definition +- Ruff reformatted entire file (single → double quotes) alongside the fix — noisy diff but harmless +- Pre-existing inconsistency: get_cards CSV uses `player.p_name`, v1_cards_get_one CSV uses raw `this_card.player` (__str__) +- v1_cards_patch still has dead roster1_id/roster2_id/roster3_id params that are accepted but silently dropped by Peewee save() — follow-up issue recommended + +### Patterns Noted +- Card model fields: player (FK), team (FK), pack (FK), value (int) — no roster fields +- Peewee silently ignores assignment to undeclared model attributes on save() +- Gitea blocks APPROVED review state for self-owned PRs; use COMMENT instead