From 5e0aa362d91d000984995ce374c2d7547d8d107f Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 30 Sep 2022 18:18:33 +0200 Subject: Fixed #33984 -- Reverted "Fixed #32980 -- Made models cache related managers." This reverts 4f8c7fd9d91b35e2c2922de4bb50c8c8066cbbc6 and adds two regression tests: - test_related_manager_refresh(), and - test_create_copy_with_m2m(). Thanks joeli for the report. --- docs/releases/4.1.2.txt | 4 ++++ docs/releases/4.1.txt | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/releases/4.1.2.txt b/docs/releases/4.1.2.txt index d607c34c92..498c645920 100644 --- a/docs/releases/4.1.2.txt +++ b/docs/releases/4.1.2.txt @@ -43,3 +43,7 @@ Bugfixes * Fixed a regression in Django 4.1 that caused a crash for :class:`View` subclasses with asynchronous handlers when handling non-allowed HTTP methods (:ticket:`34062`). + +* Reverted caching related managers for ``ForeignKey``, ``ManyToManyField``, + and ``GenericRelation`` that caused the incorrect refreshing of related + objects (:ticket:`33984`). diff --git a/docs/releases/4.1.txt b/docs/releases/4.1.txt index 11268df298..08fb7c2abc 100644 --- a/docs/releases/4.1.txt +++ b/docs/releases/4.1.txt @@ -530,7 +530,8 @@ Miscellaneous * Related managers for :class:`~django.db.models.ForeignKey`, :class:`~django.db.models.ManyToManyField`, and :class:`~django.contrib.contenttypes.fields.GenericRelation` are now cached - on the :class:`~django.db.models.Model` instance to which they belong. + on the :class:`~django.db.models.Model` instance to which they belong. *This + change was reverted in Django 4.1.2.* * The Django test runner now returns a non-zero error code for unexpected successes from tests marked with :py:func:`unittest.expectedFailure`. -- cgit v1.3