mirror of
https://github.com/pretix/pretix.git
synced 2026-08-29 13:44:40 +00:00
CartMixin: Prevent None values in sorting function
This commit is contained in:
@@ -110,13 +110,13 @@ class CartMixin:
|
|||||||
)
|
)
|
||||||
addon_penalty = 1 if pos.addon_to else 0
|
addon_penalty = 1 if pos.addon_to else 0
|
||||||
if downloads or pos.pk in has_addons or pos.addon_to:
|
if downloads or pos.pk in has_addons or pos.addon_to:
|
||||||
return i, addon_penalty, pos.pk, 0, 0, 0, 0, (pos.subevent_id or 0), pos.seat_id
|
return i, addon_penalty, pos.pk, 0, 0, 0, 0, (pos.subevent_id or 0), (pos.seat_id or 0)
|
||||||
if answers and (has_attendee_data or pos.item.questions.all()):
|
if answers and (has_attendee_data or pos.item.questions.all()):
|
||||||
return i, addon_penalty, pos.pk, 0, 0, 0, 0, (pos.subevent_id or 0), pos.seat_id
|
return i, addon_penalty, pos.pk, 0, 0, 0, 0, (pos.subevent_id or 0), (pos.seat_id or 0)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
0, addon_penalty, 0, pos.item_id, pos.variation_id, pos.price, (pos.voucher_id or 0),
|
0, addon_penalty, 0, pos.item_id, (pos.variation_id or 0), pos.price, (pos.voucher_id or 0),
|
||||||
(pos.subevent_id or 0), pos.seat_id
|
(pos.subevent_id or 0), (pos.seat_id or 0)
|
||||||
)
|
)
|
||||||
|
|
||||||
positions = []
|
positions = []
|
||||||
|
|||||||
Reference in New Issue
Block a user