mirror of
https://github.com/django/django.git
synced 2025-01-15 21:02:52 +00:00
3a0fe942dd
The query used a construct of qs.annotate().values().aggregate() where the first annotate used an F-object reference and the values() and aggregate() calls referenced that F-object. Also made sure the inner query's select clause is as simple as possible, and made sure .values().distinct().aggreate() works correctly. Backport of fb146193c49e4c683dc8da39d9b7c479375fdb57 from master