Changes between Version 1 and Version 2 of Ticket #34597, comment 2
- Timestamp:
- May 28, 2023, 10:28:09 AM (18 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #34597, comment 2
v1 v2 119 119 120 120 The only synthax that manages (in django 3.2) to replicate the query correctly (and performance wise as in django2.2) seems to be 121 {{{qs.exclude(id__in=Blog.objects.filter(translation=None, id=OuterRef("id")))}}} 121 {{{ 122 Blog.objects.filter(is_published=True, api_has_translation=False).exclude(id__in=Blog.objects.filter(translation=None, id=OuterRef("id"))) 123 }}} 122 124 123 125 While not terrible I do think something has been broken in django since the ~Q(translation=None) seems a lot cleaner and more ORMish.