mirror of
https://github.com/pretix/pretix.git
synced 2026-09-14 16:24:43 +00:00
Event calendar: consider events without products "not available" for filtering (#6515)
* Event calendar: consider events without products "not available" for filtering Also, drop the help text of the flag that is no longer accurate. * Update src/pretix/presale/views/organizer.py Co-authored-by: Richard Schreiber <schreiber@pretix.eu> --------- Co-authored-by: Richard Schreiber <schreiber@pretix.eu>
This commit is contained in:
co-authored by
Richard Schreiber
parent
caa6fb187b
commit
dc7d5c6029
@@ -75,7 +75,7 @@ from pretix.presale.views.cart import get_or_create_cart_id
|
||||
from pretix.presale.views.organizer import (
|
||||
EventListMixin, add_events_for_days, add_subevents_for_days,
|
||||
days_for_template, filter_qs_by_attr, filter_subevents_with_plugins,
|
||||
weeks_for_template,
|
||||
should_hide_subevent, weeks_for_template,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@@ -757,14 +757,10 @@ class WidgetAPIProductList(EventListMixin, View):
|
||||
evs = evs[:limit]
|
||||
|
||||
tz = request.event.timezone
|
||||
if self.request.event.settings.event_list_available_only:
|
||||
evs = [
|
||||
se for se in evs
|
||||
if not se.presale_has_ended and (
|
||||
se.best_availability_state is not None and
|
||||
se.best_availability_state >= Quota.AVAILABILITY_RESERVED
|
||||
)
|
||||
]
|
||||
evs = [
|
||||
se for se in evs
|
||||
if not should_hide_subevent(self.request.event.settings, se)
|
||||
]
|
||||
|
||||
data['events'] = [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user