#18414: queryset.exists() returns False when queryset is distinct and sliced
-------------------------------------+-------------------------------------
     Reporter:  bitrut               |                    Owner:  err
         Type:  Bug                  |                   Status:  assigned
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  orm                  |      Needs documentation:  0
    Has patch:  1                    |  Patch needs improvement:  1
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by akaariai):

 It seems this will be relatively easy to fix, just do
 {{{
 if not q.distinct:
     q.clear_select_clause()
 }}}
 instead of always doing clear_select_clause(). I'll test this & commit if
 things seem to work OK.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/18414#comment:8>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.0b3c17db974b1009a7d71da80cbffc60%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to