forked from CGM_Public/pretix_original
Presale: Hide subevent lists if subevents exist but none are visible (Z#23186153) (#5054)
* Hide subevent lists (but not calendars) if subevents exist but none are visible, to avoid confusion during checkout
This commit is contained in:
@@ -815,6 +815,7 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
|
||||
se for se in context['subevent_list']
|
||||
if not se.presale_has_ended and (se.best_availability_state is None or se.best_availability_state >= Quota.AVAILABILITY_RESERVED)
|
||||
]
|
||||
context['visible_events'] = len(context['subevent_list']) > 0
|
||||
return context
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user