Browse Source

Refs #35060 -- Fixed the update to update_fields in overridden save() method docs.

Regression in 3915d4c70d0d7673abe675525b58117a5099afd3.
Clifford Gama 6 months ago
parent
commit
38c2065154
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/topics/db/models.txt

+ 1 - 1
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.