Skip to content

Commit 9ca04ef

Browse files
committed
Opensearch use body for script update.
1 parent 968be95 commit 9ca04ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

stac_fastapi/opensearch/stac_fastapi/opensearch/database_logic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ async def json_patch_item(
941941
await self.client.update(
942942
index=index_alias_by_collection_id(collection_id),
943943
id=mk_item_id(item_id, collection_id),
944-
script=script,
944+
body={"script": script},
945945
refresh=True,
946946
)
947947

@@ -1267,7 +1267,7 @@ async def json_patch_collection(
12671267
await self.client.update(
12681268
index=COLLECTIONS_INDEX,
12691269
id=collection_id,
1270-
script=script,
1270+
body={"script": script},
12711271
refresh=True,
12721272
)
12731273

0 commit comments

Comments
 (0)