Changes between Initial Version and Version 1 of Ticket #29262, comment 19


Ignore:
Timestamp:
May 30, 2022, 3:44:20 AM (2 years ago)
Author:
Thorben Luepkes

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29262, comment 19

    initial v1  
    119119
    120120But I dont think this is quite correct. I also need the count of the annotation.
     121I also tried with
     122
     123{{{
     124cars = cars.annotate(events=FilteredRelation('car_events', condition=Q(car_events__car_id__in=ads.values_list("id", flat=True)))).filter(events__instance_created_date__gt=six_days_ago)
     125}}}
     126
     127But this results in an inner join, which i dont think is wanted here
    121128
    122129Using Django 4 and latest python release as of this writing. :)
Back to Top