diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 369747c263..e7bc1681fb 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.