From 9d524febf5ee647dd69cfc644a93a74ef19b5575 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 17 May 2021 15:25:27 +0200 Subject: [PATCH] Attempt to fix bulk quota editing --- src/pretix/control/views/subevents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pretix/control/views/subevents.py b/src/pretix/control/views/subevents.py index f521a82692..bc8fac731b 100644 --- a/src/pretix/control/views/subevents.py +++ b/src/pretix/control/views/subevents.py @@ -1274,14 +1274,14 @@ class SubEventBulkEdit(SubEventQueryMixin, EventPermissionRequiredMixin, FormVie *(f.name for f in Quota._meta.fields if f.name not in ( 'id', 'event', 'items', 'variations', 'closed', )) - ).order_by('subevent_id') + ).order_by('subevent_id', 'id') if not all_quotas: return Quota.objects.none() - quotas_by_subevent = defaultdict(list) + quotas_by_subevent = defaultdict(set) for q in all_quotas: - quotas_by_subevent[q.pop('subevent')].append(q) + quotas_by_subevent[q.pop('subevent')].add(q) prev = None for se in self.get_queryset():