Skip to content

fix(api): Return an empty CSV when stats summary has no data - #127906

Draft
joshuarli wants to merge 1 commit into
masterfrom
fix/stats-summary-empty-csv
Draft

joshuarli wants to merge 1 commit into
masterfrom
fix/stats-summary-empty-csv

Conversation

@joshuarli

@joshuarli joshuarli commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

_generate_csv in the org stats summary endpoint returned None when there were no projects in the result, and the download branch passed that straight to HttpResponse.write, which stringifies it. A download over a period with no outcomes therefore returned a 200 text/csv file whose entire body was the text None. It now returns an empty string, so the file is empty.

Integrated in #130956. This source PR remains a draft and is rebased onto f5c759434c9.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 16, 2026
@getsantry

getsantry Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

_generate_csv returned None when there were no projects, and the download response wrote it out as the literal text 'None'. Return an empty string so the downloaded file is empty.
@joshuarli
joshuarli force-pushed the fix/stats-summary-empty-csv branch from 6415bbf to 5144644 Compare November 26, 2026 00:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GitHub Team: python-typing Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant