Invoice exporter: open in binary mode

This commit is contained in:
Raphael Michel
2017-07-10 14:25:26 +02:00
parent 0663f25208
commit 9bf9dca88a

View File

@@ -21,7 +21,7 @@ class InvoiceExporter(BaseExporter):
if not i.file:
invoice_pdf_task.apply(args=(i.pk,))
i.refresh_from_db()
i.file.open('r')
i.file.open('rb')
zipf.writestr('{}.pdf'.format(i.number), i.file.read())
i.file.close()