Skip to content

Commit

Permalink
Fixed #34317 -- Renamed "instance" argument of BaseModelFormSet.save_…
Browse files Browse the repository at this point in the history
…existing() method.
  • Loading branch information
Bakdolot authored Feb 7, 2023
1 parent ae1fe72 commit 5f3c7b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion django/forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ def save_new(self, form, commit=True):
"""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)

Expand Down
3 changes: 2 additions & 1 deletion docs/releases/5.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ backends.
Miscellaneous
-------------

* ...
* The ``instance`` argument of the undocumented
``BaseModelFormSet.save_existing()`` method is renamed to ``obj``.

.. _deprecated-features-5.0:

Expand Down

0 comments on commit 5f3c7b7

Please sign in to comment.