#32414: Syntax Error when combining __in and F() in filter
-------------------------------------+-------------------------------------
     Reporter:  dfrank8              |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Database layer       |                  Version:  3.1
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:  F()                  |             Triage Stage:
                                     |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

 Looks like you either want `attendees=F('profile')` or
 
`profile__in=CalendarEvent.attendees.through.objects.filter(calendarevent=OuterRef('pk'))`.

 I guess we could raise a Python level error or adjust
 `RelatedIn.get_prep_lookup` special case `F` referring to many-to-many as
 well.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32414#comment:2>
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/065.f4403f4f81702849630c2a832f0c0ede%40djangoproject.com.

Reply via email to