﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
12295	A formset with no forms does not call self.clean() when self.is_valid() is called.	tomevans222	nobody	"Test case:

{{{
from django import forms
from django.forms.formsets import BaseFormSet, formset_factory

class EmptyFsetWontValidate(BaseFormSet):
  def clean(self):
    raise forms.ValidationError, ""Clean method called""

class SimpleForm(forms.Form):
  name = forms.CharField()

EmptyFsetWontValidateFormset = formset_factory(SimpleForm, extra=0, formset=EmptyFsetWontValidate)
formset = EmptyFsetWontValidateFormset({'form-INITIAL_FORMS':'0', 'form-TOTAL_FORMS':'0'})
formset2 = EmptyFsetWontValidateFormset({'form-INITIAL_FORMS':'0', 'form-TOTAL_FORMS':'1', 'form-0-name':'bah' })

# will return True
formset.is_valid()
# will return False
formset2.is_valid()
# But examine formset.errors...
formset.errors
# and now is_valid() will return False
formset.is_valid()
}}}

Test case is pretty straightforward. Trivial patch is attached."		closed	Forms	1.1		fixed	formset sprintSep2010		Ready for checkin	1	0	1	0	0	0
