Skip to content

fix: guard against empty entry list in download_round_entries_csv#537

Open
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:fix/csv-empty-round-indexerror
Open

fix: guard against empty entry list in download_round_entries_csv#537
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:fix/csv-empty-round-indexerror

Conversation

@ayushshukla1807
Copy link
Copy Markdown

Fixes #531.

entry_infos[0].keys() raises IndexError when a round has no entries yet.
Added a guard that falls back to a known set of static column names so
coordinators can still export a valid (empty) CSV from a freshly created
round without the server crashing.

The fix is minimal and surgical -- only the empty case is affected.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: download entries CSV crashes with IndexError when round has no entries

1 participant