mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #28674 -- Removed unused check in QuerySet._batched_insert().
This commit is contained in:
parent
27193aea00
commit
a2626cb3fe
@ -1127,12 +1127,8 @@ class QuerySet:
|
||||
|
||||
def _batched_insert(self, objs, fields, batch_size):
|
||||
"""
|
||||
A helper method for bulk_create() to insert the bulk one batch at a
|
||||
time. Insert recursively a batch from the front of the bulk and then
|
||||
_batched_insert() the remaining objects again.
|
||||
Helper method for bulk_create() to insert objs one batch at a time.
|
||||
"""
|
||||
if not objs:
|
||||
return
|
||||
ops = connections[self.db].ops
|
||||
batch_size = (batch_size or max(ops.bulk_batch_size(fields, objs), 1))
|
||||
inserted_ids = []
|
||||
|
Loading…
Reference in New Issue
Block a user