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

Fix PDF generation code flow

parent dc13b2c2
# Changelog
## next
- Fix PDF generation code flow
## 0.4.0a6
- Add explicit error message on startup if `CONFIG` env variable is not set
......
......@@ -802,9 +802,7 @@ def pdf_report():
datetime.now().strftime("%d-%m-%Y %Hh%M")
)
response = make_response(tmp_pdf_report.read_bytes())
response.headers.set(
"Content-disposition", "attachment", filename=pdf_filename
)
response.headers.set("Content-disposition", "attachment", filename=pdf_filename)
response.headers.set("Content-type", "application/pdf")
response.headers.set("Content-length", tmp_pdf_report.stat().st_size)
......
Markdown is supported
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