Event product list: Hotfix for pathological performance in large event series (#6318)

* Event product list: Hotfix for pathological performance

* Stop outputting bullsht numbers to widget
This commit is contained in:
Raphael Michel
2026-06-29 19:02:06 +02:00
committed by GitHub
parent f4ca230af7
commit d40492748a
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -215,7 +215,6 @@ def get_grouped_items(event, *, channel: SalesChannel, subevent=None, voucher=No
prefetch_var,
prefetch_bundles,
).annotate(
quotac=Count('quotas'),
has_variations=Count('variations'),
subevent_disabled=Exists(
SubEventItem.objects.filter(
@@ -235,7 +234,8 @@ def get_grouped_items(event, *, channel: SalesChannel, subevent=None, voucher=No
),
requires_seat=requires_seat,
).filter(
quotac__gt=0, subevent_disabled=False,
Exists(Quota.items.through.objects.filter(quota__subevent_id=subevent, item_id=OuterRef("pk"))),
subevent_disabled=False,
).order_by('category__position', 'category_id', 'position', 'name')
if require_seat:
items = items.filter(requires_seat__gt=0)
+1 -1
View File
@@ -352,7 +352,7 @@ class WidgetAPIProductList(EventListMixin, View):
'picture': get_picture(self.request.event, item.picture, '60x60^') if item.picture else None,
'picture_fullsize': get_picture(self.request.event, item.picture) if item.picture else None,
'description': str(rich_text(item.description, safelinks=False)) if item.description else None,
'has_variations': item.has_variations,
'has_variations': bool(item.has_variations),
'current_unavailability_reason': item.current_unavailability_reason,
'order_min': item.min_per_order,
'order_max': item.order_max if not item.has_variations else None,