Skip to content

Commit f0de05e

Browse files
committed
Fixes chunk algorithm on batch size limit
1 parent 221a023 commit f0de05e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

algoliasearch/search_index.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -498,17 +498,17 @@ def _chunk(self, action, objects, request_options,
498498

499499
if len(batch) == batch_size:
500500
if validate_object_id:
501-
assert_object_id(objects)
501+
assert_object_id(batch)
502502

503-
requests = build_raw_response_batch(action, objects)
503+
requests = build_raw_response_batch(action, batch)
504504
raw_responses.append(
505505
self._raw_batch(requests, request_options))
506506
batch = []
507507

508508
if len(batch):
509509
if validate_object_id:
510-
assert_object_id(objects)
511-
requests = build_raw_response_batch(action, objects)
510+
assert_object_id(batch)
511+
requests = build_raw_response_batch(action, batch)
512512
raw_responses.append(self._raw_batch(requests, request_options))
513513

514514
return IndexingResponse(self, raw_responses)

0 commit comments

Comments
 (0)