forked from CGM_Public/pretix_original
Add option to limit events to specific sales channels (#1867)
This commit is contained in:
@@ -348,6 +348,9 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
|
||||
r._csp_ignore = True
|
||||
return r
|
||||
|
||||
if request.sales_channel.identifier not in request.event.sales_channels:
|
||||
raise Http404(_('Tickets for this event cannot be purchased on this sales channel.'))
|
||||
|
||||
if request.event.has_subevents:
|
||||
if 'subevent' in kwargs:
|
||||
self.subevent = request.event.subevents.using(settings.DATABASE_REPLICA).filter(pk=kwargs['subevent'], active=True).first()
|
||||
|
||||
Reference in New Issue
Block a user