From 38c206515494cb28c48f77c10145a8aa9a172629 Mon Sep 17 00:00:00 2001 From: Clifford Gama Date: Fri, 6 Sep 2024 14:29:15 +0200 Subject: [PATCH] Refs #35060 -- Fixed the update to update_fields in overridden save() method docs. Regression in 3915d4c70d0d7673abe675525b58117a5099afd3. --- docs/topics/db/models.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 369747c2637..e7bc1681fb2 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -917,7 +917,7 @@ example:: if ( update_fields := kwargs.get("update_fields") ) is not None and "name" in update_fields: - update_fields = {"slug"}.union(update_fields) + kwargs["update_fields"] = {"slug"}.union(update_fields) super().save(**kwargs) See :ref:`ref-models-update-fields` for more details.