mirror of
https://github.com/pretix/pretix.git
synced 2026-08-12 11:07:02 +00:00
improve code style
This commit is contained in:
@@ -1837,7 +1837,7 @@ class InvoiceDownload(EventPermissionRequiredMixin, View):
|
||||
return redirect(self.get_order_url())
|
||||
|
||||
try:
|
||||
resp = FileResponse(
|
||||
return FileResponse(
|
||||
self.invoice.file.file,
|
||||
filename='{}.pdf'.format(re.sub("[^a-zA-Z0-9-_.]+", "_", self.invoice.number)),
|
||||
content_type='application/pdf'
|
||||
@@ -1846,8 +1846,6 @@ class InvoiceDownload(EventPermissionRequiredMixin, View):
|
||||
invoice_pdf_task.apply(args=(self.invoice.pk,))
|
||||
return self.get(request, *args, **kwargs)
|
||||
|
||||
return resp
|
||||
|
||||
|
||||
class OrderExtend(OrderView):
|
||||
permission = 'can_change_orders'
|
||||
|
||||
Reference in New Issue
Block a user