mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[4.1.x] Fixed #34139 -- Fixed acreate(), aget_or_create(), and aupdate_or_create() methods for related managers.
Bug in58b27e0dbb. Backport of7b94847e38from main
This commit is contained in:
committed by
Mariusz Felisiak
parent
8740d2f452
commit
9fb57fcc70
@@ -76,6 +76,9 @@ Related objects reference
|
||||
intermediate instance(s).
|
||||
|
||||
.. method:: create(through_defaults=None, **kwargs)
|
||||
.. method:: acreate(through_defaults=None, **kwargs)
|
||||
|
||||
*Asynchronous version*: ``acreate``
|
||||
|
||||
Creates a new object, saves it and puts it in the related object set.
|
||||
Returns the newly created object::
|
||||
@@ -110,6 +113,10 @@ Related objects reference
|
||||
needed. You can use callables as values in the ``through_defaults``
|
||||
dictionary.
|
||||
|
||||
.. versionchanged:: 4.1
|
||||
|
||||
``acreate()`` method was added.
|
||||
|
||||
.. method:: remove(*objs, bulk=True)
|
||||
|
||||
Removes the specified model objects from the related object set::
|
||||
|
||||
@@ -16,3 +16,7 @@ Bugfixes
|
||||
an empty :meth:`Sitemap.items() <django.contrib.sitemaps.Sitemap.items>` and
|
||||
a callable :attr:`~django.contrib.sitemaps.Sitemap.lastmod`
|
||||
(:ticket:`34088`).
|
||||
|
||||
* Fixed a bug in Django 4.1 that caused a crash of ``acreate()``,
|
||||
``aget_or_create()``, and ``aupdate_or_create()`` asynchronous methods for
|
||||
related managers (:ticket:`34139`).
|
||||
|
||||
Reference in New Issue
Block a user