mirror of
https://github.com/pretix/pretix.git
synced 2026-08-19 12:16:26 +00:00
Seating: Set subevents to None if event has no subevents for _seat_allowed annotation (Z#23243880) (#6487)
This commit is contained in:
@@ -2008,7 +2008,10 @@ class OrderChange(OrderView):
|
||||
'issued_gift_cards',
|
||||
'addons',
|
||||
).annotate(
|
||||
_seat_allowed=Exists(SeatCategoryMapping.objects.filter(subevent=OuterRef("subevent"), product=OuterRef("item")))
|
||||
_seat_allowed=Exists(SeatCategoryMapping.objects.filter(
|
||||
subevent=OuterRef("subevent") if self.request.event.has_subevents else None,
|
||||
product=OuterRef("item"))
|
||||
)
|
||||
))
|
||||
for p in positions:
|
||||
p.form = OrderPositionChangeForm(
|
||||
|
||||
Reference in New Issue
Block a user