Skip to content

Commit

Permalink
Split long statement over 2 lines
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Oct 16, 2024
1 parent 5ec6e3e commit 58046a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drf_excel/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ def finalize_response(self, request, response, *args, **kwargs):
isinstance(response, Response)
and response.accepted_renderer.format == "xlsx"
):
filename = self.get_filename(request=request, *args, **kwargs) # noqa: B026
response["content-disposition"] = (
f"attachment; filename={escape_uri_path(self.get_filename(request=request, *args, **kwargs))}" # noqa: B026
f"attachment; filename={escape_uri_path(filename)}"
)
return response

0 comments on commit 58046a2

Please sign in to comment.