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
......
......@@ -797,18 +797,16 @@ def pdf_report():
)
return redirect(url_for("home"))
# Send PDF report
pdf_filename = "Rapport de validation {}.pdf".format(
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-type", "application/pdf")
response.headers.set("Content-length", tmp_pdf_report.stat().st_size)
# Send PDF report
pdf_filename = "Rapport de validation {}.pdf".format(
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-type", "application/pdf")
response.headers.set("Content-length", tmp_pdf_report.stat().st_size)
return response
return response
def extract_schema_metadata(table_schema: frictionless.Schema):
......
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