mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[5.1.x] Refs #35060 -- Fixed the update to update_fields in overridden save() method docs.
Regression in3915d4c70d. Backport of38c2065154from main.
This commit is contained in:
committed by
Sarah Boyce
parent
d3da505999
commit
bf45f06769
@@ -918,7 +918,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.
|
||||
|
||||
Reference in New Issue
Block a user