Changes between Version 1 and Version 2 of Ticket #34597, comment 1


Ignore:
Timestamp:
May 25, 2023, 12:15:42 PM (18 months ago)
Author:
Simon Charette

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #34597, comment 1

    v1 v2  
    1313}}}
    1414
     15I'd also be curious to hear if the following is faster as it should be equivalent
     16
     17{{{#!python
     18Blog.objects.filter(
     19    Q(is_published=True) & Exist(Translation.objects.filter(id=OuterRef("id")))
     20)
     21}}}
     22
     23
    1524In the mean time you can use `~Q(id__in=Blog.objects.filter(translation=None, id=OuterRef("id")))` instead of `~Q(translation=None)` to restore the previous behaviour if you're blocked.
Back to Top