#31714: ResolvedOuterRef object has no get_lookup
-------------------------------------+-------------------------------------
     Reporter:  BorisZZZ             |                    Owner:  Phil-
         Type:                       |  Barber
  Cleanup/optimization               |                   Status:  assigned
    Component:  Database layer       |                  Version:  3.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak):

 
`filtered_relation.tests.FilteredRelationTests.test_conditional_expression_with_subquery`
 should work when this ticket is fixed:

 {{{#!python
 def test_conditional_expression_with_subquery(self):
     self.assertSequenceEqual(
         Author.objects.annotate(
             book_editor=FilteredRelation(
                 "book__editor",
                 condition=Q(Exists(
                     Editor.objects.annotate(
                         author_name=OuterRef('name'),
                     ).filter(
                         author_name__istartswith=F('name'),
                     )
                 )),
             ),
         ),
         [self.author1],
     )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/31714#comment:5>
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/01070187987758f6-8c665a27-4147-4199-99d1-d05d3514237e-000000%40eu-central-1.amazonses.com.

Reply via email to