summaryrefslogtreecommitdiff
path: root/django/forms/formsets.py
diff options
context:
space:
mode:
authorJoseph Kocherhans <joseph@jkocherhans.com>2009-03-31 19:55:20 +0000
committerJoseph Kocherhans <joseph@jkocherhans.com>2009-03-31 19:55:20 +0000
commit15becf23a9e4c9b230745738d2d42f6ab8f0f031 (patch)
treeafccfb3d96e5c586e8630faabf92f4973f96ba05 /django/forms/formsets.py
parent98f5f68463adae5be03f77b594626385221e3ed9 (diff)
Forms in model formsets and inline formsets can now be deleted even if they don't validate. Related to #9587.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/forms/formsets.py')
-rw-r--r--django/forms/formsets.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/django/forms/formsets.py b/django/forms/formsets.py
index 3421b56e8c..66ccd6d08d 100644
--- a/django/forms/formsets.py
+++ b/django/forms/formsets.py
@@ -228,9 +228,8 @@ class BaseFormSet(StrAndUnicode):
# more code than we'd like, but the form's cleaned_data will
# not exist if the form is invalid.
field = form.fields[DELETION_FIELD_NAME]
- prefix = form.add_prefix(DELETION_FIELD_NAME)
- value = field.widget.value_from_datadict(self.data, self.files, prefix)
- should_delete = field.clean(value)
+ raw_value = form._raw_value(DELETION_FIELD_NAME)
+ should_delete = field.clean(raw_value)
if should_delete:
# This form is going to be deleted so any of its errors
# should not cause the entire formset to be invalid.