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 <noreply@anthropic.com>
This commit is contained in:
parent
d031553e03
commit
6a2e8a2d2a
@ -141,9 +141,8 @@ async def v1_cards_get_one(card_id, csv: Optional[bool] = False):
|
|||||||
|
|
||||||
if csv:
|
if csv:
|
||||||
data_list = [
|
data_list = [
|
||||||
['id', 'player', 'team', 'pack', 'value', 'roster1', 'roster2', 'roster3'],
|
['id', 'player', 'team', 'pack', 'value'],
|
||||||
[this_card.id, this_card.player, this_card.team.abbrev, this_card.pack, this_card.value,
|
[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]
|
|
||||||
]
|
]
|
||||||
return_val = DataFrame(data_list).to_csv(header=False, index=False)
|
return_val = DataFrame(data_list).to_csv(header=False, index=False)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user