Ticket #10284: django_modelformset_commit_false_delete.diff

File django_modelformset_commit_false_delete.diff, 635 bytes (added by laureline.guerin@…, 16 years ago)

Patch for described issue

  • django/forms/models.py

     
    403403            obj = existing_objects[form.cleaned_data[self._pk_field.name]]
    404404            if self.can_delete and form.cleaned_data[DELETION_FIELD_NAME]:
    405405                self.deleted_objects.append(obj)
    406                 obj.delete()
     406                if commit:
     407                    obj.delete()
    407408            else:
    408409                if form.changed_data:
    409410                    self.changed_objects.append((obj, form.changed_data))
Back to Top