s
This commit is contained in:
1 parent
803a4412c1
commit
b40526c494
1 file changed
+4
-6
@@ -141,17 +141,15 @@ async def migrate_sku_to_gtin():
|
||||
# Update variations while preserving all other fields
|
||||
fresh_item_data["variations"] = updated_variations
|
||||
|
||||
upsert_body = {
|
||||
"idempotency_key": str(uuid.uuid4()),
|
||||
"object": {
|
||||
await client.catalog.object.upsert(
|
||||
idempotency_key=str(uuid.uuid4()),
|
||||
object={
|
||||
"type": "ITEM",
|
||||
"id": item_id,
|
||||
"version": fresh_version,
|
||||
"item_data": fresh_item_data,
|
||||
},
|
||||
}
|
||||
|
||||
await client.catalog.object.upsert(body=upsert_body)
|
||||
)
|
||||
print(f"[@INFO] ✓ Successfully updated item {item_id}")
|
||||
updated_items += 1
|
||||
|
||||
|
||||
Reference in new issue
Block a user