mirror of
https://github.com/pretix/pretix.git
synced 2026-05-10 16:04:02 +00:00
PDF: fix deduplicated list of addons (exclude canceled) (#3538)
This commit is contained in:
committed by
GitHub
parent
10a83935d9
commit
9bd3444aad
@@ -702,10 +702,10 @@ def get_seat(op: OrderPosition):
|
|||||||
|
|
||||||
def generate_compressed_addon_list(op, order, event):
|
def generate_compressed_addon_list(op, order, event):
|
||||||
itemcount = defaultdict(int)
|
itemcount = defaultdict(int)
|
||||||
addons = (
|
addons = [p for p in (
|
||||||
op.addons.all() if 'addons' in getattr(op, '_prefetched_objects_cache', {})
|
op.addons.all() if 'addons' in getattr(op, '_prefetched_objects_cache', {})
|
||||||
else op.addons.select_related('item', 'variation')
|
else op.addons.select_related('item', 'variation')
|
||||||
)
|
) if not p.canceled]
|
||||||
for pos in addons:
|
for pos in addons:
|
||||||
itemcount[pos.item, pos.variation] += 1
|
itemcount[pos.item, pos.variation] += 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user