forked from CGM_Public/pretix_original
Do not treat event as free if there are mandatory non-free addons (#3646)
This commit is contained in:
@@ -516,12 +516,13 @@ class EventIndex(EventViewMixin, EventListMixin, CartMixin, TemplateView):
|
||||
items = [i for i in items if not i.requires_seat]
|
||||
context['itemnum'] = len(items)
|
||||
context['allfree'] = all(
|
||||
item.display_price.gross == Decimal('0.00') for item in items if not item.has_variations
|
||||
item.display_price.gross == Decimal('0.00') and not item.mandatory_priced_addons
|
||||
for item in items if not item.has_variations
|
||||
) and all(
|
||||
all(
|
||||
var.display_price.gross == Decimal('0.00')
|
||||
for var in item.available_variations
|
||||
)
|
||||
) and not item.mandatory_priced_addons
|
||||
for item in items if item.has_variations
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user