claude-memory/graph/fixes/fix-remove-dead-roster-fields-from-csv-in-paper-dynasty-data-475fcd.md

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
paper-dynasty
paper-dynasty-database
python
fastapi
fix
csv
dead-code
0.5 0.8 2026-03-03T19:37:39.735071+00:00 2026-03-03T19:37:40.347025+00:00
target type direction strength edge_id
61b618e7-6c6a-46be-9dec-b31b57cb19fe RELATED_TO outgoing 0.75 14902c20-b159-422e-bf42-ad47ff012b9c
target type direction strength edge_id
1e0e14cd-588f-417d-8fcb-a48a6cca506d RELATED_TO outgoing 0.91 48578061-7e76-4d05-b9f1-a60d73ee7ca3
target type direction strength edge_id
b1eb1655-e006-447d-a0cf-bba7a914b331 RELATED_TO outgoing 0.73 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: cal/paper-dynasty-database#37