--- id: 475fcd0d-8d29-471b-a6e3-f3face5320c9 type: fix title: "Fix: Remove dead roster fields from CSV in paper-dynasty-database v1_cards_get_one" tags: [paper-dynasty, paper-dynasty-database, python, fastapi, fix, csv, dead-code] importance: 0.5 confidence: 0.8 created: "2026-03-03T19:37:39.735071+00:00" updated: "2026-03-03T19:37:40.347025+00:00" relations: - target: 61b618e7-6c6a-46be-9dec-b31b57cb19fe type: RELATED_TO direction: outgoing strength: 0.75 edge_id: 14902c20-b159-422e-bf42-ad47ff012b9c - target: 1e0e14cd-588f-417d-8fcb-a48a6cca506d type: RELATED_TO direction: outgoing strength: 0.91 edge_id: 48578061-7e76-4d05-b9f1-a60d73ee7ca3 - target: b1eb1655-e006-447d-a0cf-bba7a914b331 type: RELATED_TO direction: outgoing strength: 0.73 edge_id: 38a69e2a-f67b-4130-b5fa-a9dee11003d2 --- ## 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_patch` still accepts `roster1_id`, `roster2_id`, `roster3_id` query params that are silently ignored — tracked as separate cleanup - PR: https://git.manticorum.com/cal/paper-dynasty-database/pulls/37