--- 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.749702+00:00" relations: - target: 0fdd32ea-6b6a-4cd0-aa4b-117184e0c81d type: RELATED_TO direction: outgoing strength: 0.89 edge_id: 5456aab2-c93f-4c4d-b69f-dfc9d8960e2d - target: b9375a89-6e0f-4722-bca7-f1cd655de81a type: RELATED_TO direction: outgoing strength: 0.89 edge_id: df40d204-9543-4ced-950a-534034448858 - target: 1e0e14cd-588f-417d-8fcb-a48a6cca506d type: RELATED_TO direction: outgoing strength: 0.88 edge_id: da9c25a4-9c58-44d7-b73a-b920194f935a --- ## 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