Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/newforms/models.py
View
2  django/newforms/models.py
@@ -269,7 +269,7 @@ def save(self, commit=True):
# 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))
Please sign in to comment.
Something went wrong with that request. Please try again.