#34957: Cannot filter over annotated "FilteredRelation" since Django 5
-----------------------------------------+------------------------
               Reporter:  younes-chaoui  |          Owner:  nobody
                   Type:  Bug            |         Status:  new
              Component:  Uncategorized  |        Version:  5.0
               Severity:  Normal         |       Keywords:
           Triage Stage:  Unreviewed     |      Has patch:  0
    Needs documentation:  0              |    Needs tests:  0
Patch needs improvement:  0              |  Easy pickings:  0
                  UI/UX:  0              |
-----------------------------------------+------------------------
 After updating  to django 5.0b1 I get test fails when using a filter over
 annotated "FilteredRelation". This is an example :

 {{{
 from django.db.models import F, FilteredRelation, Q
 visites = (
     Visite.objects.all()
     .annotate(
         etat_at_date_de_visite=FilteredRelation(
             "site__siteusage__etats",
 condition=Q(site__siteusage__etats__date_valeur=F("date_de_visite")),
         )
     )
     .filter(etat_at_date_de_visite__isnull=False)
 )
 print(visites)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34957>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018bae67ed13-e504c74a-b181-495a-a792-4a2219ac756f-000000%40eu-central-1.amazonses.com.

Reply via email to