claude-memory/graph/workflows/pr-review-paper-dynasty-database51-get-one-player-csv-orderi-853f14.md

43 lines
1.5 KiB
Markdown

---
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:44.365530+00:00"
relations:
- target: b9375a89-6e0f-4722-bca7-f1cd655de81a
type: RELATED_TO
direction: outgoing
strength: 0.85
edge_id: a4145603-881e-4bed-97e2-00a5ee893977
- target: 0fdd32ea-6b6a-4cd0-aa4b-117184e0c81d
type: RELATED_TO
direction: outgoing
strength: 0.85
edge_id: f4a88cce-7b08-4563-88ac-7a587db56f36
- target: 1e0e14cd-588f-417d-8fcb-a48a6cca506d
type: RELATED_TO
direction: outgoing
strength: 0.84
edge_id: c4b95b14-a3c9-433b-8883-f17d212a5151
---
## 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`