Skip to content

Commit fb61e33

Browse files
committed
Split long statement over 2 lines
1 parent 3c7b8e1 commit fb61e33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drf_excel/mixins.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ def finalize_response(self, request, response, *args, **kwargs):
2626
isinstance(response, Response)
2727
and response.accepted_renderer.format == "xlsx"
2828
):
29+
filename = self.get_filename(request=request, *args, **kwargs) # noqa: B026
2930
response["content-disposition"] = (
30-
f"attachment; filename={escape_uri_path(self.get_filename(request=request, *args, **kwargs))}" # noqa: B026
31+
f"attachment; filename={escape_uri_path(filename)}"
3132
)
3233
return response

0 commit comments

Comments
 (0)