mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Sort positions by ID
This commit is contained in:
@@ -163,7 +163,7 @@ class OrderDetail(OrderView):
|
||||
'item', 'variation'
|
||||
).prefetch_related(
|
||||
'item__questions', 'answers', 'answers__question'
|
||||
)
|
||||
).order_by('positionid')
|
||||
|
||||
positions = []
|
||||
for p in cartpos:
|
||||
|
||||
@@ -40,10 +40,10 @@ class CartMixin:
|
||||
# Django is unable to join related models in a .values() query
|
||||
def keyfunc(pos):
|
||||
if downloads:
|
||||
return pos.id, 0, 0, 0, 0
|
||||
return pos.positionid, 0, 0, 0, 0
|
||||
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, 0
|
||||
return pos.positionid, 0, 0, 0, 0
|
||||
return 0, pos.item_id, pos.variation_id, pos.price, (pos.voucher_id or 0)
|
||||
|
||||
positions = []
|
||||
|
||||
Reference in New Issue
Block a user