diff options
| author | Tim Graham <timograham@gmail.com> | 2017-10-03 19:56:44 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-03 19:56:44 -0400 |
| commit | a2626cb3fec2e67bb0ec4be2e992e1a836b7567e (patch) | |
| tree | dfb1331e2406a747ba26f84d8c30da2d96be4b56 /django | |
| parent | 27193aea0088b238e3ee0f0f235364a34a09265c (diff) | |
Fixed #28674 -- Removed unused check in QuerySet._batched_insert().
Diffstat (limited to 'django')
| -rw-r--r-- | django/db/models/query.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/django/db/models/query.py b/django/db/models/query.py index 140fff7ec7..b05497db7a 100644 --- a/django/db/models/query.py +++ b/django/db/models/query.py @@ -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 = [] |
