Skip to content
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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 9495486 commit 99e8171a610389e295a83b6f69b4e4d442984a2f @freakboy3742 freakboy3742 committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/newforms/
2 django/newforms/
@@ -269,7 +269,7 @@ def save(self, commit=True):
# update/save existing instances
for form in self.change_forms:
instance = instances[form.cleaned_data[]]
- if form.cleaned_data[DELETION_FIELD_NAME]:
+ if self.deletable and form.cleaned_data[DELETION_FIELD_NAME]:
saved_instances.append(self.save_instance(form, instance, commit=commit))

0 comments on commit 99e8171

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