Changes between Version 2 and Version 3 of Ticket #32663
- Timestamp:
- Apr 18, 2021, 12:53:26 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32663 – Description
v2 v3 40 40 model_scores_latest_date_annotation = Max('model_scores__date') 41 41 latest_score_annotation = Case(When(model_scores__date=F('latest_date'), then='model_scores__score') 42 base_query_set = (Model.objects.43 44 45 46 47 42 base_query_set = base_query_set = (Model.objects. 43 filter(**filters). 44 alias(latest_date=model_scores_latest_date_annotation). 45 values(ID). 46 annotate(latest_score=latest_score_annotation, latest_date=model_scores_latest_date_annotation) 47 ) 48 48 49 49 }}}