mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Fixed a problem with cancellations
This commit is contained in:
@@ -110,7 +110,7 @@ class AsyncAction:
|
|||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
'ready': True,
|
'ready': True,
|
||||||
'redirect': self.get_success_url(value),
|
'redirect': self.get_success_url(value),
|
||||||
'message': self.get_success_message(value)
|
'message': str(self.get_success_message(value))
|
||||||
})
|
})
|
||||||
return redirect(self.get_success_url(value))
|
return redirect(self.get_success_url(value))
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ class AsyncAction:
|
|||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
'ready': True,
|
'ready': True,
|
||||||
'redirect': self.get_error_url(),
|
'redirect': self.get_error_url(),
|
||||||
'message': self.get_error_message(exception)
|
'message': str(self.get_error_message(exception))
|
||||||
})
|
})
|
||||||
return redirect(self.get_error_url())
|
return redirect(self.get_error_url())
|
||||||
|
|
||||||
|
|||||||
@@ -292,7 +292,7 @@ class OrderCancelDo(EventViewMixin, OrderDetailMixin, AsyncAction, View):
|
|||||||
def post(self, request, *args, **kwargs):
|
def post(self, request, *args, **kwargs):
|
||||||
if not self.order:
|
if not self.order:
|
||||||
raise Http404(_('Unknown order code or not authorized to access this order.'))
|
raise Http404(_('Unknown order code or not authorized to access this order.'))
|
||||||
return self.do(self.order)
|
return self.do(self.order.pk)
|
||||||
|
|
||||||
def get_context_data(self, **kwargs):
|
def get_context_data(self, **kwargs):
|
||||||
ctx = super().get_context_data(**kwargs)
|
ctx = super().get_context_data(**kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user