From 99e5dff737cd20b12d060e4794e097063b61ec40 Mon Sep 17 00:00:00 2001 From: Simon Charette Date: Tue, 16 May 2023 15:11:19 -0400 Subject: Fixed #34570 -- Silenced noop deferral of many-to-many and GFK. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit While deferring many-to-many and GFK has no effect, the previous implementation of QuerySet.defer() ignore them instead of crashing. Regression in b3db6c8dcb5145f7d45eff517bcd96460475c879. Thanks Paco Martínez for the report. --- docs/releases/4.2.2.txt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/releases/4.2.2.txt b/docs/releases/4.2.2.txt index a92582b7a0..ca21e5f1ec 100644 --- a/docs/releases/4.2.2.txt +++ b/docs/releases/4.2.2.txt @@ -15,3 +15,7 @@ Bugfixes * Restored, following a regression in Django 4.2, ``get_prep_value()`` call in ``JSONField`` subclasses (:ticket:`34539`). + +* Fixed a regression in Django 4.2 that caused a crash of ``QuerySet.defer()`` + when passing a ``ManyToManyField`` or ``GenericForeignKey`` reference. While + doing so is a no-op, it was allowed in older version (:ticket:`34570`). -- cgit v1.3