Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

newforms-admin: Fixed #5758 -- Added a check to ensure that an inline…

… model formset is actually deletable before checking the deletion field. Thanks, Brian Rosner and akaihola.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6654 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 99e8171a610389e295a83b6f69b4e4d442984a2f 1 parent 9495486
Russell Keith-Magee authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/newforms/models.py
2  django/newforms/models.py
@@ -269,7 +269,7 @@ def save(self, commit=True):
269 269
             # update/save existing instances
270 270
             for form in self.change_forms:
271 271
                 instance = instances[form.cleaned_data[self.model._meta.pk.attname]]
272  
-                if form.cleaned_data[DELETION_FIELD_NAME]:
  272
+                if self.deletable and form.cleaned_data[DELETION_FIELD_NAME]:
273 273
                     instance.delete()
274 274
                 else:
275 275
                     saved_instances.append(self.save_instance(form, instance, commit=commit))

0 notes on commit 99e8171

Please sign in to comment.
Something went wrong with that request. Please try again.