diff options
| author | Clifford Gama <cliffygamy@gmail.com> | 2024-09-06 14:29:15 +0200 |
|---|---|---|
| committer | Sarah Boyce <42296566+sarahboyce@users.noreply.github.com> | 2024-09-11 13:25:21 +0200 |
| commit | bf45f0676951243894e3686a80c3ebaa2c1cf107 (patch) | |
| tree | bee7973c6b5e024908940c9889fd5e4bb269e948 | |
| parent | d3da5059996ef71b86a79279ab8f4972b7d1e70a (diff) | |
[5.1.x] Refs #35060 -- Fixed the update to update_fields in overridden save() method docs.
Regression in 3915d4c70d0d7673abe675525b58117a5099afd3.
Backport of 38c206515494cb28c48f77c10145a8aa9a172629 from main.
| -rw-r--r-- | docs/topics/db/models.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/topics/db/models.txt b/docs/topics/db/models.txt index 244e9bbb16..ee4bdab7bb 100644 --- a/docs/topics/db/models.txt +++ b/docs/topics/db/models.txt @@ -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. |
