mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Subevent bulk edit: check if list formset has changed only if not None (#2173)
This commit is contained in:
committed by
GitHub
parent
bcbc8a542f
commit
9c6a2eb85a
@@ -1151,10 +1151,9 @@ class SubEventBulkEdit(SubEventQueryMixin, EventPermissionRequiredMixin, FormVie
|
|||||||
extra = 0
|
extra = 0
|
||||||
kwargs = {}
|
kwargs = {}
|
||||||
|
|
||||||
if self.sampled_lists is not None:
|
if self.sampled_lists is None:
|
||||||
kwargs['instance'] = self.get_queryset()[0]
|
|
||||||
else:
|
|
||||||
return None
|
return None
|
||||||
|
kwargs['instance'] = self.get_queryset()[0]
|
||||||
|
|
||||||
formsetclass = inlineformset_factory(
|
formsetclass = inlineformset_factory(
|
||||||
SubEvent, CheckinList,
|
SubEvent, CheckinList,
|
||||||
@@ -1167,7 +1166,7 @@ class SubEventBulkEdit(SubEventQueryMixin, EventPermissionRequiredMixin, FormVie
|
|||||||
)
|
)
|
||||||
|
|
||||||
def save_list_formset(self, log_entries):
|
def save_list_formset(self, log_entries):
|
||||||
if not self.list_formset.has_changed() or self.sampled_lists is None:
|
if self.sampled_lists is None or not self.list_formset.has_changed():
|
||||||
return
|
return
|
||||||
qidx = 0
|
qidx = 0
|
||||||
subevents = list(self.get_queryset().prefetch_related('checkinlist_set'))
|
subevents = list(self.get_queryset().prefetch_related('checkinlist_set'))
|
||||||
|
|||||||
Reference in New Issue
Block a user