mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Show proper error message in case of add-ons that are required, sold-out and hidden (#4545)
This commit is contained in:
@@ -645,6 +645,7 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
|
||||
ctx['forms'] = self.forms
|
||||
ctx['cart'] = self.get_cart()
|
||||
ctx['cross_selling_data'] = self.cross_selling_data
|
||||
ctx['incomplete'] = not self.is_completed(self.request)
|
||||
return ctx
|
||||
|
||||
def get_success_message(self, value):
|
||||
@@ -660,7 +661,7 @@ class AddOnsStep(CartMixin, AsyncAction, TemplateFlowStep):
|
||||
self.request = request
|
||||
if 'async_id' in request.GET and settings.HAS_CELERY:
|
||||
return self.get_result(request)
|
||||
if len(self.forms) == 0 and len(self.cross_selling_data) == 0:
|
||||
if len(self.forms) == 0 and len(self.cross_selling_data) == 0 and self.is_completed(request):
|
||||
return redirect(self.get_next_url(request))
|
||||
return TemplateFlowStep.get(self, request)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user