Ticket #5758: 5758_fix.diff

File 5758_fix.diff, 665 bytes (added by Brian Rosner, 17 years ago)
  • django/newforms/models.py

    === django/newforms/models.py
    ==================================================================
     
    269269            # update/save existing instances
    270270            for form in self.change_forms:
    271271                instance = instances[form.cleaned_data[self.model._meta.pk.attname]]
    272                 if form.cleaned_data[DELETION_FIELD_NAME]:
     272                if form.cleaned_data.get(DELETION_FIELD_NAME, False):
    273273                    instance.delete()
    274274                else:
    275275                    saved_instances.append(self.save_instance(form, instance, commit=commit))
Back to Top