#8171: Invalid formset when form is missing from POST data
-------------------------------------------------------+--------------------
          Reporter:  James Chua <[EMAIL PROTECTED]>  |         Owner:  brosner 
            Status:  reopened                          |     Milestone:  1.0    
 
         Component:  Forms                             |       Version:  SVN    
 
        Resolution:                                    |      Keywords:  
formsets
             Stage:  Accepted                          |     Has_patch:  0      
 
        Needs_docs:  0                                 |   Needs_tests:  0      
 
Needs_better_patch:  0                                 |  
-------------------------------------------------------+--------------------
Changes (by veena):

  * status:  closed => reopened
  * resolution:  wontfix =>

Comment:

 There is a bug which perhaps relate to this ticket.

 When you set form-TOTAL_FORMS for example to 5 but send less than 5 forms
 then formset.is_valid() goes buggy True.
 formsets.forms contain 5 forms. So when you iterate through forms then you
 go through 5 cycles. Each form.is_valid() is same buggy True (?!) and
 form.cleaned_data is empty dictionary in each missing forms (that's how I
 discover it. KeyError on cleaned_data dictionary.) form.errors is empty
 for missing forms.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/8171#comment:8>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to