1.8 KiB
1.8 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 475fcd0d-8d29-471b-a6e3-f3face5320c9 | fix | Fix: Remove dead roster fields from CSV in paper-dynasty-database v1_cards_get_one |
|
0.5 | 0.8 | 2026-03-03T19:37:39.735071+00:00 | 2026-03-03T19:37:40.347025+00:00 |
|
Problem
GET /api/v2/cards/{card_id}?csv=true raised AttributeError at runtime because v1_cards_get_one referenced this_card.roster1.name, this_card.roster2.name, this_card.roster3.name — fields that do not exist on the Card model.
Root Cause
Dead code referencing removed/never-implemented roster relationship fields on the Card ORM model. The Card model only has player, team, pack, value.
Solution
Removed roster1, roster2, roster3 from both the CSV header row and data row in v1_cards_get_one (app/routers_v2/cards.py).
Files Changed
app/routers_v2/cards.py— removed roster columns from CSV output
Notes
- ruff linter hook reformats entire file on save (single→double quotes, line wrapping) — cosmetic noise in the diff
v1_cards_patchstill acceptsroster1_id,roster2_id,roster3_idquery params that are silently ignored — tracked as separate cleanup- PR: cal/paper-dynasty-database#37