From c627226d05dd52aef59447dcfb29cec2c2b11b8a Mon Sep 17 00:00:00 2001 From: DhruvaPatil98 Date: Thu, 23 Jun 2022 12:32:41 +0530 Subject: Fixed #33799, Refs #31685 -- Added parameters for updating conflicts to QuerySeta.abulk_create(). --- django/db/models/query.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'django') diff --git a/django/db/models/query.py b/django/db/models/query.py index a169d0c235..be0deb90b0 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -834,11 +834,22 @@ class QuerySet: return objs - async def abulk_create(self, objs, batch_size=None, ignore_conflicts=False): + async def abulk_create( + self, + objs, + batch_size=None, + ignore_conflicts=False, + update_conflicts=False, + update_fields=None, + unique_fields=None, + ): return await sync_to_async(self.bulk_create)( objs=objs, batch_size=batch_size, ignore_conflicts=ignore_conflicts, + update_conflicts=update_conflicts, + update_fields=update_fields, + unique_fields=unique_fields, ) def bulk_update(self, objs, fields, batch_size=None): -- cgit v1.3