mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Exporters: Fix crash in error url determination (#2114)
This commit is contained in:
committed by
GitHub
parent
3378744a5c
commit
efc2efac84
@@ -2204,10 +2204,17 @@ class ExportDoView(EventPermissionRequiredMixin, ExportMixin, AsyncAction, Templ
|
||||
'organizer': self.request.event.organizer.slug
|
||||
}) + '?identifier=' + self.exporter.identifier
|
||||
|
||||
def get_check_url(self, task_id, ajax):
|
||||
return self.request.path + '?async_id=%s&exporter=%s' % (task_id, self.exporter.identifier) + ('&ajax=1' if ajax else '')
|
||||
|
||||
@cached_property
|
||||
def exporter(self):
|
||||
if self.request.method == "POST":
|
||||
identifier = self.request.POST.get("exporter")
|
||||
else:
|
||||
identifier = self.request.GET.get("exporter")
|
||||
for ex in self.exporters:
|
||||
if ex.identifier == self.request.POST.get("exporter"):
|
||||
if ex.identifier == identifier:
|
||||
return ex
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user