mirror of https://github.com/django/django.git
Refs #35060 -- Fixed the update to update_fields in overridden save() method docs.
Regression in 3915d4c70d
.
This commit is contained in:
parent
0bfaa55708
commit
38c2065154
|
@ -917,7 +917,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.
|
||||||
|
|
Loading…
Reference in New Issue