#10082: Attribute BaseFormetSet.ordered_forms is broken with blank formsets
------------------------------------------------------------+---------------
          Reporter:  Petr Marhoun <[email protected]>  |         Owner:  
nobody
            Status:  new                                    |     Milestone:  
1.1   
         Component:  Forms                                  |       Version:  
SVN   
        Resolution:                                         |      Keywords:    
    
             Stage:  Accepted                               |     Has_patch:  1 
    
        Needs_docs:  0                                      |   Needs_tests:  0 
    
Needs_better_patch:  0                                      |  
------------------------------------------------------------+---------------
Comment (by bmathieu):

 This patch is not the right fix. Basically the problem is that
 "compare_ordering_values" is defined inside the loop, whereas it is used
 outside. Thus if the field is empty the loop is never run.
 So just define the sorting function where it should be: after the loop,
 just before "sort".

 see attached patch file.

 in any case please backport in 1.0.x!

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10082#comment:2>
Django <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