summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorDhruvaPatil98 <dhruvapatil98@gmail.com>2022-06-23 12:32:41 +0530
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2022-06-23 11:12:35 +0200
commitc627226d05dd52aef59447dcfb29cec2c2b11b8a (patch)
treef469407374607a8cc090fcab3f51fccc7f470f22 /django
parente6f36ea0a97af5c7d18bd155a6c4a937cf658ce6 (diff)
Fixed #33799, Refs #31685 -- Added parameters for updating conflicts to QuerySeta.abulk_create().
Diffstat (limited to 'django')
-rw-r--r--django/db/models/query.py13
1 files changed, 12 insertions, 1 deletions
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):