Fix AttributeError in exporters

This commit is contained in:
Raphael Michel
2023-04-16 14:11:41 +02:00
parent a3fb10bcb0
commit 35a3804751
6 changed files with 9 additions and 9 deletions

View File

@@ -155,7 +155,7 @@ class InvoiceExporter(InvoiceExporterMixin, BaseExporter):
self.progress_callback(counter / total * 100)
if self.is_multievent:
filename = '{}_invoices.zip'.format(self.events.first().organizer.slug)
filename = '{}_invoices.zip'.format(self.organizer.slug)
else:
filename = '{}_invoices.zip'.format(self.event.slug)
@@ -415,7 +415,7 @@ class InvoiceDataExporter(InvoiceExporterMixin, MultiSheetListExporter):
def get_filename(self):
if self.is_multievent:
return '{}_invoices'.format(self.events.first().organizer.slug)
return '{}_invoices'.format(self.organizer.slug)
else:
return '{}_invoices'.format(self.event.slug)