mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Fixed a bug in cart sorting method
This commit is contained in:
@@ -140,8 +140,8 @@ class OrderDetail(OrderView):
|
||||
def keyfunc(pos):
|
||||
if (pos.item.admission and self.request.event.settings.attendee_names_asked) \
|
||||
or pos.item.questions.all():
|
||||
return pos.id, 0, 0, 0, 0, None
|
||||
return 0, pos.item_id, pos.variation_id, pos.price, pos.tax_rate, pos.voucher
|
||||
return pos.id, 0, 0, 0, 0, 0
|
||||
return 0, pos.item_id, pos.variation_id, pos.price, pos.tax_rate, (pos.voucher_id or 0)
|
||||
|
||||
positions = []
|
||||
for k, g in groupby(sorted(list(cartpos), key=keyfunc), key=keyfunc):
|
||||
|
||||
@@ -48,8 +48,8 @@ class CartMixin:
|
||||
def keyfunc(pos):
|
||||
if answers and ((pos.item.admission and self.request.event.settings.attendee_names_asked)
|
||||
or pos.item.questions.all()):
|
||||
return pos.id, 0, 0, 0, None
|
||||
return 0, pos.item_id, pos.variation_id, pos.price, pos.voucher
|
||||
return pos.id, 0, 0, 0, 0
|
||||
return 0, pos.item_id, pos.variation_id, pos.price, (pos.voucher_id or 0)
|
||||
|
||||
positions = []
|
||||
for k, g in groupby(sorted(list(cartpos), key=keyfunc), key=keyfunc):
|
||||
|
||||
Reference in New Issue
Block a user