Fix get_one_player CSV response — data row never written to output #12

Closed
opened 2026-02-20 06:52:11 +00:00 by cal · 1 comment
Owner

`app/routers_v2/players.py:608-664`. `return_val` assigned from `DataFrame(data_list).to_csv()` on line 635, then actual player data row appended to `data_list` on line 636 — after CSV was already computed. CSV always contains only header row.

Priority: high

\`app/routers_v2/players.py:608-664\`. \`return_val\` assigned from \`DataFrame(data_list).to_csv()\` on line 635, then actual player data row appended to \`data_list\` on line 636 — after CSV was already computed. CSV always contains only header row. **Priority**: high
cal added the
bug
label 2026-02-20 06:52:11 +00:00
cal added the
ai-working
label 2026-03-04 02:30:51 +00:00
Author
Owner

Fixed in PR #51.

Root cause: DataFrame(data_list).to_csv() was called before data_list.append(player_row), so the CSV always contained only the header row.

Fix: Moved the to_csv() call to after the append() — a single-line swap with no other changes.

Fixed in PR #51. **Root cause:** `DataFrame(data_list).to_csv()` was called before `data_list.append(player_row)`, so the CSV always contained only the header row. **Fix:** Moved the `to_csv()` call to after the `append()` — a single-line swap with no other changes.
cal added
ai-pr-opened
and removed
ai-working
labels 2026-03-04 02:32:34 +00:00
cal closed this issue 2026-03-10 18:26:23 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-database#12
No description provided.