#36798: TypeError: MultilingualQuerySet._update() takes 2 positional arguments but
3 were given when saving model with 'update_fiels' argument
-------------------------------------+-------------------------------------
Reporter: Nikolay Fedorov | Type: Bug
Status: new | Component: Database
| layer (models, ORM)
Version: 6.0 | Severity: Normal
Keywords: update fields, save | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
When attempting to save a model object with
{{{obj.save(update_fields=["myfield"])}}}, a TypeError occurs stating that
{{{MultilingualQuerySet._update()}}} received 3 positional arguments but
expected only 2. In previous version of django it's work fine.
{{{
Env: Python 3.13.3
Django 6.0
}}}
{{{
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/Volumes/WWW/mysite/utils/ffmpeg/metadata.py", line 65, in
<module>
video.save(update_fields=["myfield"])
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/user/.pyenv/versions/mysite/lib/python3.13/site-
packages/django/db/models/base.py", line 874, in save
self.save_base(
~~~~~~~~~~~~~~^
using=using,
^^^^^^^^^^^^
...<2 lines>...
update_fields=update_fields,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/Users/user/.pyenv/versions/mysite/lib/python3.13/site-
packages/django/db/models/base.py", line 966, in save_base
updated = self._save_table(
raw,
...<4 lines>...
update_fields,
)
File "/Users/user/.pyenv/versions/mysite/lib/python3.13/site-
packages/django/db/models/base.py", line 1110, in _save_table
results = self._do_update(
base_qs,
...<5 lines>...
returning_fields,
)
File "/Users/user/.pyenv/versions/mysite/lib/python3.13/site-
packages/django/db/models/base.py", line 1211, in _do_update
return filtered._update(values, returning_fields)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: MultilingualQuerySet._update() takes 2 positional arguments but
3 were given
}}}
--
Ticket URL: <
https://code.djangoproject.com/ticket/36798>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.