forked from CGM_Public/pretix_original
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
|
||||
kwargs = {}
|
||||
|
||||
if self.sampled_lists is not None:
|
||||
kwargs['instance'] = self.get_queryset()[0]
|
||||
else:
|
||||
if self.sampled_lists is None:
|
||||
return None
|
||||
kwargs['instance'] = self.get_queryset()[0]
|
||||
|
||||
formsetclass = inlineformset_factory(
|
||||
SubEvent, CheckinList,
|
||||
@@ -1167,7 +1166,7 @@ class SubEventBulkEdit(SubEventQueryMixin, EventPermissionRequiredMixin, FormVie
|
||||
)
|
||||
|
||||
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
|
||||
qidx = 0
|
||||
subevents = list(self.get_queryset().prefetch_related('checkinlist_set'))
|
||||
|
||||
Reference in New Issue
Block a user