forked from CGM_Public/pretix_original
Bump Django to 4.1.* (#2989)
This commit is contained in:
@@ -747,7 +747,7 @@ class ItemVariationsFormSet(I18nFormSet):
|
||||
|
||||
def _should_delete_form(self, form):
|
||||
should_delete = super()._should_delete_form(form)
|
||||
if should_delete and (form.instance.orderposition_set.exists() or form.instance.cartposition_set.exists()):
|
||||
if should_delete and form.instance.pk and (form.instance.orderposition_set.exists() or form.instance.cartposition_set.exists()):
|
||||
form._delete_fail = True
|
||||
return False
|
||||
return form.cleaned_data.get(DELETION_FIELD_NAME, False)
|
||||
|
||||
Reference in New Issue
Block a user