From 42c08ee46539ef44f8658ebb1cbefb408e0d03fe Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Wed, 13 May 2020 23:38:29 -0400 Subject: Fixed #31566 -- Fixed aliases crash when chaining values()/values_list() after annotate() with aggregations and subqueries. Subquery annotation references must be resolved if they are excluded from the GROUP BY clause by a following .values() call. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Thanks Makina Corpus for the report. --- docs/releases/3.0.7.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/3.0.7.txt b/docs/releases/3.0.7.txt index 9fc71d9aa2..5457e59b3d 100644 --- a/docs/releases/3.0.7.txt +++ b/docs/releases/3.0.7.txt @@ -11,3 +11,7 @@ Bugfixes * Fixed a regression in Django 3.0 by restoring the ability to use field lookups in ``Meta.ordering`` (:ticket:`31538`). + +* Fixed a regression in Django 3.0 where ``QuerySet.values()`` and + ``values_list()`` crashed if a queryset contained an aggregation and a + subquery annotation (:ticket:`31566`). -- cgit v1.3