Skip to content

fix: null-check rnd.name before slugify in download_results_csv#544

Open
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:fix/slugify-null-check-in-download-results-csv
Open

fix: null-check rnd.name before slugify in download_results_csv#544
ayushshukla1807 wants to merge 1 commit into
hatnote:masterfrom
ayushshukla1807:fix/slugify-null-check-in-download-results-csv

Conversation

@ayushshukla1807

Copy link
Copy Markdown
Contributor

Fixes #542.

slugify(rnd.name, ...) raises AttributeError if rnd.name is None. Added a null-guard with a sensible fallback (unnamed-round).

Also replaced colons in isoformat() output with dashes since colons in filenames cause issues on Windows/macOS when downloading the CSV.

@ItsAbhinavM ItsAbhinavM left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayushshukla1807 thank you for your contribution. Since you are trying to cover file naming issue with.replace(':', '-') I believe datetime.now().isoformat() would include microseconds which has .. It'd be good if you could cover that as well. The rest of the changes looks good. @lgelauff we can merge this if this is adequate for the issue.

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.

download_results_csv uses slugify without null-check on rnd.name

2 participants