dsfadsfsa

This commit is contained in:
C committed 2026-01-04 14:11:21 -08:00
1 parent 3dfd6a27b9
commit 803a4412c1
1 file changed
+6 -4
+6 -4
View File
@@ -41,8 +41,7 @@ async def migrate_sku_to_gtin():
while True: while True:
print(f"[@INFO] Processing page {page}...") print(f"[@INFO] Processing page {page}...")
result = await client.catalog.search( search_params = {
body={
"object_types": ["ITEM"], "object_types": ["ITEM"],
"query": { "query": {
"exact_query": { "exact_query": {
@@ -51,9 +50,12 @@ async def migrate_sku_to_gtin():
} }
}, },
"limit": 100, "limit": 100,
"cursor": cursor,
} }
)
if cursor:
search_params["cursor"] = cursor
result = await client.catalog.search(**search_params)
result_json = json.loads(result.model_dump_json()) result_json = json.loads(result.model_dump_json())
items = result_json.get("objects", []) items = result_json.get("objects", [])