Bug fix in export PDF

This commit is contained in:
Gregory Trullemans 2022-05-26 07:20:57 +02:00
parent 856bf28c5c
commit 68f868e28b
1 changed files with 2 additions and 2 deletions

View File

@ -206,10 +206,10 @@ def generate_pdf_for_spf(request, accounting_year):
""" """
response = HttpResponse(content_type="application/pdf") response = HttpResponse(content_type="application/pdf")
response["Content-Disposition"] = ( response["Content-Disposition"] = (
'attachment; filename="comptes_simplifies_annuels_' + accounting_year + '.pdf"' 'attachment; filename="comptes_simplifies_annuels_' + str(accounting_year) + '.pdf"'
) )
document = SpfDocument(response) document = SpfDocument(response)
document.generate(accounting_year) document.generate(str(accounting_year))
document.download() document.download()
return response return response