forked from CGM_Public/pretix_original
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
|
'organizer': self.request.event.organizer.slug
|
||||||
}) + '?identifier=' + self.exporter.identifier
|
}) + '?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
|
@cached_property
|
||||||
def exporter(self):
|
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:
|
for ex in self.exporters:
|
||||||
if ex.identifier == self.request.POST.get("exporter"):
|
if ex.identifier == identifier:
|
||||||
return ex
|
return ex
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user