From 6a2e8a2d2a5fb724ec840c8de8231ab27e518f95 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Tue, 3 Mar 2026 12:06:21 -0600 Subject: [PATCH] fix: remove dead roster fields from CSV in v1_cards_get_one (#25) Card model has no roster1/2/3 fields. Accessing them would raise AttributeError at runtime. Removed the non-existent columns from the CSV header and data row. Co-Authored-By: Claude Sonnet 4.6 --- app/routers_v2/cards.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/routers_v2/cards.py b/app/routers_v2/cards.py index a501021..8627ef4 100644 --- a/app/routers_v2/cards.py +++ b/app/routers_v2/cards.py @@ -141,9 +141,8 @@ async def v1_cards_get_one(card_id, csv: Optional[bool] = False): if csv: data_list = [ - ['id', 'player', 'team', 'pack', 'value', 'roster1', 'roster2', 'roster3'], - [this_card.id, this_card.player, this_card.team.abbrev, this_card.pack, this_card.value, - this_card.roster1.name, this_card.roster2.name, this_card.roster3.name] + ['id', 'player', 'team', 'pack', 'value'], + [this_card.id, this_card.player, this_card.team.abbrev, this_card.pack, this_card.value] ] return_val = DataFrame(data_list).to_csv(header=False, index=False) -- 2.25.1