dsfadsfsa

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