From 187118203197801c6cb72dc8b06b714b23b6dd3d Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 26 Apr 2021 09:22:46 +0200 Subject: Fixed #32682 -- Made admin changelist use Exists() instead of distinct() for preventing duplicates. Thanks Zain Patel for the report and Simon Charette for reviews. The exception introduced in 6307c3f1a123f5975c73b231e8ac4f115fd72c0d revealed a possible data loss issue in the admin. --- docs/releases/3.2.1.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'docs') diff --git a/docs/releases/3.2.1.txt b/docs/releases/3.2.1.txt index f99dacac0c..83d317bc7e 100644 --- a/docs/releases/3.2.1.txt +++ b/docs/releases/3.2.1.txt @@ -59,3 +59,9 @@ Bugfixes * Fixed a bug in Django 3.2 where variable lookup errors were logged when rendering some admin templates (:ticket:`32681`). + +* Fixed a bug in Django 3.2 where an admin changelist would crash when deleting + objects filtered against multi-valued relationships (:ticket:`32682`). The + admin changelist now uses ``Exists()`` instead ``QuerySet.distinct()`` + because calling ``delete()`` after ``distinct()`` is not allowed in Django + 3.2 to address a data loss possibility. -- cgit v1.3