2.1 KiB
2.1 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 96137768-1e1e-4d7c-9890-6443ecd5cc36 | workflow | PR review: paper-dynasty-database#37 — remove dead roster CSV fields |
|
0.4 | 0.8 | 2026-03-03T20:03:36.362466+00:00 | 2026-03-03T20:03:36.749702+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 rawthis_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