summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBakdolot <80908236+Bakdolot@users.noreply.github.com>2023-02-07 19:18:58 +0600
committerGitHub <noreply@github.com>2023-02-07 14:18:58 +0100
commit5f3c7b7e1d059397e915bfa71409b49648b5d524 (patch)
tree4c7ddf87e3b3b0788f670aba3b6657c8aa0b24c5
parentae1fe72e9b1f5fe3b05e5b670bd0c205cd305e71 (diff)
Fixed #34317 -- Renamed "instance" argument of BaseModelFormSet.save_existing() method.
-rw-r--r--django/forms/models.py2
-rw-r--r--docs/releases/5.0.txt3
2 files changed, 3 insertions, 2 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 35ecdc1c0d..a8e6432f2a 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -756,7 +756,7 @@ class BaseModelFormSet(BaseFormSet, AltersData):
"""Save and return a new model instance for the given form."""
return form.save(commit=commit)
- def save_existing(self, form, instance, commit=True):
+ def save_existing(self, form, obj, commit=True):
"""Save and return an existing model instance for the given form."""
return form.save(commit=commit)
diff --git a/docs/releases/5.0.txt b/docs/releases/5.0.txt
index 8146f3bb67..a6f827e472 100644
--- a/docs/releases/5.0.txt
+++ b/docs/releases/5.0.txt
@@ -240,7 +240,8 @@ backends.
Miscellaneous
-------------
-* ...
+* The ``instance`` argument of the undocumented
+ ``BaseModelFormSet.save_existing()`` method is renamed to ``obj``.
.. _deprecated-features-5.0: