1
0
mirror of https://github.com/django/django.git synced 2025-03-13 02:40:47 +00:00

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

Regression in 3915d4c70d0d7673abe675525b58117a5099afd3.

Backport of 38c206515494cb28c48f77c10145a8aa9a172629 from main.
This commit is contained in:
Clifford Gama 2024-09-06 14:29:15 +02:00 committed by Sarah Boyce
parent d3da505999
commit bf45f06769

View File

@ -918,7 +918,7 @@ example::
if ( if (
update_fields := kwargs.get("update_fields") update_fields := kwargs.get("update_fields")
) is not None and "name" in 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) super().save(**kwargs)
See :ref:`ref-models-update-fields` for more details. See :ref:`ref-models-update-fields` for more details.