#11707: limit_choices_to on a ForeignKey can render duplicate options in 
formfield
-------------------------------------+-------------------------------------
               Reporter:             |          Owner:  charstring
  Chris.Wesseling@…                  |         Status:  new
                   Type:  Bug        |      Component:  Forms
              Milestone:             |       Severity:  Normal
                Version:  SVN        |       Keywords:  ForeingKey
             Resolution:             |  limit_choices_to, dceu2011
           Triage Stage:  Accepted   |      Has patch:  1
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------

Comment (by jacob):

 Discussion from IRC:

 {{{
 [02:24am] I don't see a test case here that emulates the failures seen
 when the previous (committed then reverted) approach. Am I just missing
 it?
 [09:26am] jacobkm: I also can't say I'm particularly happy with the patch,
 particularly iterating over the qs in distinct_choices().
 [09:26am] chars:It's pretty hard to test for me. It's a case where
 Postgres can't compare the values.
 [09:26am] chars: So it can't test for uniqueness
 [09:26am] jacobkm: It also needs additions to documentation to mention
 that Q() objects are acceptable in limit_choices_to.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/11707#comment:19>
Django <https://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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to