Fix invalid task call

This commit is contained in:
Raphael Michel
2016-11-11 15:17:17 +01:00
parent 342a41f1d7
commit 1bc6da262f

View File

@@ -19,7 +19,7 @@ class InvoiceExporter(BaseExporter):
with ZipFile(os.path.join(d, 'tmp.zip'), 'w') as zipf:
for i in self.event.invoices.all():
if not i.file:
invoice_pdf_task.apply_async(args=(i.pk))
invoice_pdf_task.apply(args=(i.pk,))
i.refresh_from_db()
i.file.open('r')
zipf.writestr('{}.pdf'.format(i.number), i.file.read())