mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
filter non-buyable items from list
This commit is contained in:
@@ -161,7 +161,6 @@ class ItemCategory(LoggedModel):
|
||||
if self.cross_selling_condition == 'always':
|
||||
return self.items.all(), {}
|
||||
if self.cross_selling_condition == 'products':
|
||||
# TODO set max_count for products with max_per_order
|
||||
match = set(match.pk for match in self.cross_selling_match_products.only('pk')) # TODO prefetch this
|
||||
return (self.items.all(), {}) if any(pos.item.pk in match for pos in cart) else (None, {})
|
||||
if self.cross_selling_condition == 'discounts':
|
||||
|
||||
Reference in New Issue
Block a user