Problem
In admin_endpoints.py, download_results_csv calls:
output_name = 'montage_results-%s-%s.csv' % (slugify(rnd.name, ascii=True).decode('ascii'), now)
If rnd.name is None (which is theoretically possible if a round was created with a missing name before validation was enforced), slugify(None, ...) will raise an AttributeError.
The same pattern exists in download_round_entries_csv, which was fixed in #531. This endpoint has the same latent bug.
Suggested Fix
Add a null-guard:
round_name = rnd.name or 'unnamed-round'
output_name = 'montage_results-%s-%s.csv' % (slugify(round_name, ascii=True).decode('ascii'), now)
Problem
In
admin_endpoints.py,download_results_csvcalls:If
rnd.nameisNone(which is theoretically possible if a round was created with a missing name before validation was enforced),slugify(None, ...)will raise anAttributeError.The same pattern exists in
download_round_entries_csv, which was fixed in #531. This endpoint has the same latent bug.Suggested Fix
Add a null-guard: