summaryrefslogtreecommitdiff
path: root/django/newforms/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/newforms/models.py')
-rw-r--r--django/newforms/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/newforms/models.py b/django/newforms/models.py
index 5fdbc4d959..31ed13c2b6 100644
--- a/django/newforms/models.py
+++ b/django/newforms/models.py
@@ -269,7 +269,7 @@ class BaseModelFormSet(BaseFormSet):
# update/save existing instances
for form in self.change_forms:
instance = instances[form.cleaned_data[self.model._meta.pk.attname]]
- if form.cleaned_data[DELETION_FIELD_NAME]:
+ if self.deletable and form.cleaned_data[DELETION_FIELD_NAME]:
instance.delete()
else:
saved_instances.append(self.save_instance(form, instance, commit=commit))