#20564: Querying (exclude) on a GenericRelation's DateTimeField through a 
related
object fails
-------------------------------------+-------------------------------------
     Reporter:  nferrari             |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:
  (models, ORM)                      |  1.6-alpha-1
     Severity:  Release blocker      |               Resolution:  fixed
     Keywords:  contenttype exclude  |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by nferrari):

 Ok I updated the models to have a name CharField each, and inserted a few
 objects (see dump.json).

 The 1.5 shell returned:

 {{{
 In [1]: from foobar.models import *

 In [2]: C.objects.exclude(a__flag=None).count()
 Out[2]: 5

 In [3]: C.objects.exclude(b__a__flag=None).count()
 Out[3]: 4
 }}}

 While the new environment shell gives:

 {{{
 >>> from foobar.models import *
 >>> C.objects.exclude(a__flag=None).count()
 0
 >>> C.objects.exclude(b__a__flag=None).count()
 0
 }}}

 Old results are expected, let me know if you need more information.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20564#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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.03949196a451cc79418eb66b33def2ec%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to