store: PR review: paper-dynasty-database#51 — get_one_player CSV ordering fix
This commit is contained in:
parent
321bffa2d0
commit
1a2a3a54eb
@ -0,0 +1,26 @@
|
||||
---
|
||||
id: 853f145a-3742-4057-8138-2a1ceab0d704
|
||||
type: workflow
|
||||
title: "PR review: paper-dynasty-database#51 — get_one_player CSV ordering fix"
|
||||
tags: [pr-reviewer, paper-dynasty-database, python, fastapi, pandas, csv, bugfix]
|
||||
importance: 0.4
|
||||
confidence: 0.8
|
||||
created: "2026-03-04T02:48:43.944119+00:00"
|
||||
updated: "2026-03-04T02:48:43.944119+00:00"
|
||||
---
|
||||
|
||||
## PR #51: fix: compute CSV after appending data row in get_one_player
|
||||
|
||||
**Verdict:** APPROVED (posted as COMMENT — Gitea blocks self-approval)
|
||||
|
||||
**File reviewed:** `app/routers_v2/players.py`
|
||||
|
||||
**Root cause:** `return_val = DataFrame(data_list).to_csv(...)` was called before `data_list.append(player_data_row)`, so the CSV only ever contained the header row.
|
||||
|
||||
**Fix:** Moved `to_csv()` call to after the `data_list.append(...)` block. Minimal, correct, single-line reorder.
|
||||
|
||||
**Notes:**
|
||||
- No security issues
|
||||
- No test suite in this repo
|
||||
- Pre-existing style note: using header as first list element + `header=False` is non-idiomatic pandas, but out of scope
|
||||
- Branch: `ai/paper-dynasty-database-12` → `next-release`
|
||||
Loading…
Reference in New Issue
Block a user