Commit 21b10327 authored by Pierre Dittgen's avatar Pierre Dittgen
Browse files

Fix PDF generation code flow

parent dc13b2c2
# Changelog # Changelog
## next
- Fix PDF generation code flow
## 0.4.0a6 ## 0.4.0a6
- Add explicit error message on startup if `CONFIG` env variable is not set - Add explicit error message on startup if `CONFIG` env variable is not set
......
...@@ -802,9 +802,7 @@ def pdf_report(): ...@@ -802,9 +802,7 @@ def pdf_report():
datetime.now().strftime("%d-%m-%Y %Hh%M") datetime.now().strftime("%d-%m-%Y %Hh%M")
) )
response = make_response(tmp_pdf_report.read_bytes()) response = make_response(tmp_pdf_report.read_bytes())
response.headers.set( response.headers.set("Content-disposition", "attachment", filename=pdf_filename)
"Content-disposition", "attachment", filename=pdf_filename
)
response.headers.set("Content-type", "application/pdf") response.headers.set("Content-type", "application/pdf")
response.headers.set("Content-length", tmp_pdf_report.stat().st_size) response.headers.set("Content-length", tmp_pdf_report.stat().st_size)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment