Skip to content

Commit 4fcc10f

Browse files
committed
fyxthon
1 parent 7fdc5d9 commit 4fcc10f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

templates/python/api.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ from algoliasearch.search.models import (
1515
from algoliasearch.ingestion.models import (WatchResponse)
1616
from algoliasearch.ingestion.config import IngestionConfig
1717
from algoliasearch.ingestion.client import (IngestionClient, IngestionClientSync)
18+
from algoliasearch.ingestion.models import Action as IngestionAction
1819
{{/isSearchClient}}
1920
{{#isIngestionClient}}
2021
from algoliasearch.ingestion.models import (Action, WatchResponse, Event, PushTaskRecords)

templates/python/search_helpers.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@
305305
"""
306306
if self._ingestion_transporter is None:
307307
raise ValueError("`region` must be provided at client instantiation before calling this method.")
308-
return {{^isSyncClient}}await {{/isSyncClient}}self._ingestion_transporter.chunked_push(index_name=index_name, objects=objects, action=Action.ADDOBJECT, wait_for_tasks=wait_for_tasks, batch_size=batch_size, request_options=request_options)
308+
return {{^isSyncClient}}await {{/isSyncClient}}self._ingestion_transporter.chunked_push(index_name=index_name, objects=objects, action=IngestionAction.ADDOBJECT, wait_for_tasks=wait_for_tasks, batch_size=batch_size, request_options=request_options)
309309
310310
{{^isSyncClient}}async {{/isSyncClient}}def delete_objects(
311311
self,
@@ -348,7 +348,7 @@
348348
"""
349349
if self._ingestion_transporter is None:
350350
raise ValueError("`region` must be provided at client instantiation before calling this method.")
351-
return {{^isSyncClient}}await {{/isSyncClient}}self._ingestion_transporter.chunked_push(index_name=index_name, objects=objects, action=Action.PARTIALUPDATEOBJECT if create_if_not_exists else Action.PARTIALUPDATEOBJECTNOCREATE, wait_for_tasks=wait_for_tasks, batch_size=batch_size, request_options=request_options)
351+
return {{^isSyncClient}}await {{/isSyncClient}}self._ingestion_transporter.chunked_push(index_name=index_name, objects=objects, action=IngestionAction.PARTIALUPDATEOBJECT if create_if_not_exists else IngestionAction.PARTIALUPDATEOBJECTNOCREATE, wait_for_tasks=wait_for_tasks, batch_size=batch_size, request_options=request_options)
352352
353353
{{^isSyncClient}}async {{/isSyncClient}}def chunked_batch(
354354
self,

0 commit comments

Comments
 (0)