From c7dd50de0d8c637a121efa476cb196d7ffc4e796 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Thu, 2 Apr 2020 16:53:17 +0200 Subject: [PATCH] CartMixin: Prevent None values in sorting function --- src/pretix/presale/views/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pretix/presale/views/__init__.py b/src/pretix/presale/views/__init__.py index b9522a87e5..12852aa201 100644 --- a/src/pretix/presale/views/__init__.py +++ b/src/pretix/presale/views/__init__.py @@ -110,13 +110,13 @@ class CartMixin: ) addon_penalty = 1 if pos.addon_to else 0 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()): - 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 ( - 0, addon_penalty, 0, pos.item_id, pos.variation_id, pos.price, (pos.voucher_id or 0), - (pos.subevent_id or 0), pos.seat_id + 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 or 0) ) positions = []