mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix ordering of add-on products in email info block
This commit is contained in:
@@ -165,9 +165,20 @@ class TemplateBasedMailRenderer(BaseHTMLMailRenderer):
|
|||||||
has_addons=Count('addons')
|
has_addons=Count('addons')
|
||||||
))
|
))
|
||||||
htmlctx['cart'] = [(k, list(v)) for k, v in groupby(
|
htmlctx['cart'] = [(k, list(v)) for k, v in groupby(
|
||||||
positions, key=lambda op: (
|
sorted(
|
||||||
op.item, op.variation, op.subevent, op.attendee_name,
|
positions,
|
||||||
(op.pk if op.addon_to_id else None), (op.pk if op.has_addons else None)
|
key=lambda op: (
|
||||||
|
(op.addon_to.positionid if op.addon_to_id else op.positionid),
|
||||||
|
op.positionid
|
||||||
|
)
|
||||||
|
),
|
||||||
|
key=lambda op: (
|
||||||
|
op.item,
|
||||||
|
op.variation,
|
||||||
|
op.subevent,
|
||||||
|
op.attendee_name,
|
||||||
|
(op.pk if op.addon_to_id else None),
|
||||||
|
(op.pk if op.has_addons else None)
|
||||||
)
|
)
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user