Author: russellm
Date: 2007-11-05 20:38:12 -0600 (Mon, 05 Nov 2007)
New Revision: 6654
Modified:
django/branches/newforms-admin/django/newforms/models.py
Log:
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.
Modified: django/branches/newforms-admin/django/newforms/models.py
===================================================================
--- django/branches/newforms-admin/django/newforms/models.py 2007-11-06
00:39:36 UTC (rev 6653)
+++ django/branches/newforms-admin/django/newforms/models.py 2007-11-06
02:38:12 UTC (rev 6654)
@@ -269,7 +269,7 @@
# 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))
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---