fix contract recap
This commit is contained in:
@@ -250,12 +250,13 @@ def get_contract_recap(
|
||||
)
|
||||
form = form_service.get_one(session, form_id=form_id)
|
||||
contracts = service.get_all(session, user, forms=[form.name])
|
||||
filename = f'{form.name}_recapitulatif_contrats.ods'
|
||||
return StreamingResponse(
|
||||
io.BytesIO(generate_recap(contracts, form)),
|
||||
media_type='application/zip',
|
||||
media_type='application/vnd.oasis.opendocument.spreadsheet',
|
||||
headers={
|
||||
'Content-Disposition': (
|
||||
'attachment; filename=filename.ods'
|
||||
f'attachment; filename={filename}'
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user