From 720de4d0441fcfdb543051389c70efbe66ed962a Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Sat, 21 Dec 2019 23:22:49 -0500 Subject: Fixed #31109 -- Disabled grouping by aliases on QuerySet.exists(). Clearing the SELECT clause in Query.has_results was orphaning GROUP BY references to it. Thanks Thierry Bastian for the report and Baptiste Mispelon for the bisect. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. --- docs/releases/3.0.2.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs') diff --git a/docs/releases/3.0.2.txt b/docs/releases/3.0.2.txt index 53b066838a..ccc82b18ae 100644 --- a/docs/releases/3.0.2.txt +++ b/docs/releases/3.0.2.txt @@ -11,3 +11,6 @@ Bugfixes * Fixed a regression in Django 3.0 that didn't include columns referenced by a ``Subquery()`` in the ``GROUP BY`` clause (:ticket:`31094`). + +* Fixed a regression in Django 3.0 where ``QuerySet.exists()`` crashed if a + queryset contained an aggregation over a ``Subquery()`` (:ticket:`31109`). -- cgit v1.3