Ticket #10284: modelformset_false_delete.diff

File modelformset_false_delete.diff, 624 bytes (added by Wedg, 5 years ago)

Patch against latest trunk.

  • django/forms/models.py

     
    601601                should_delete = form.fields[DELETION_FIELD_NAME].clean(raw_delete_value)
    602602                if should_delete:
    603603                    self.deleted_objects.append(obj)
    604                     obj.delete()
     604                    if commit:
     605                        obj.delete()
    605606                    continue
    606607            if form.has_changed():
    607608                self.changed_objects.append((obj, form.changed_data))
Back to Top