From 48e19bae49f271cccbb8a8f4549c9366b7cecac6 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Tue, 20 Apr 2021 22:25:52 -0400 Subject: [3.2.x] Fixed #32650 -- Fixed handling subquery aliasing on queryset combination. This issue started manifesting itself when nesting a combined subquery relying on exclude() since 8593e162c9cb63a6c0b06daf045bc1c21eb4d7c1 but sql.Query.combine never properly handled subqueries outer refs in the first place, see QuerySetBitwiseOperationTests.test_subquery_aliases() (refs #27149). Thanks Raffaele Salmaso for the report. Backport of 6d0cbe42c3d382e5393d4af48185c546bb0ada1f from main --- docs/releases/3.2.1.txt | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs') diff --git a/docs/releases/3.2.1.txt b/docs/releases/3.2.1.txt index 4aece451e1..07d449ae8d 100644 --- a/docs/releases/3.2.1.txt +++ b/docs/releases/3.2.1.txt @@ -51,3 +51,8 @@ Bugfixes * Fixed a bug in Django 3.2 where a system check would crash on the :setting:`STATICFILES_DIRS` setting with a list of 2-tuples of ``(prefix, path)`` (:ticket:`32665`). + +* Fixed a long standing bug involving queryset bitwise combination when used + with subqueries that began manifesting in Django 3.2, due to a separate fix + using ``Exists`` to ``exclude()`` multi-valued relationships + (:ticket:`32650`). -- cgit v1.3