Closed andylolz closed 6 years ago
Issue reopened as this is the subject of pull request into the production version of the code: https://github.com/IATI/IATI-Datastore/pull/258
Closing because this was fixed by #251 (although the related tests in #263 – requested in #258 and originally the blocker for pushing this live – have not been merged).
The csv routes aren’t sufficiently strict about the bit between the final segment of the route and the ‘csv’ ending E.g. both /api/1/access/budget.csv and /api/1/access/budgets.csv work:
In fact, the following custom filename hack also works:
http://datastore.iatistandard.org/api/1/access/budgettt.Hey_look.A_custom_filename.csv
Kind of cool. But probably worth fixing. I suspect checking the value of format rather than
request.path.endswith
would do the trick.