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
|
# Update variations while preserving all other fields
|
||||||
fresh_item_data["variations"] = updated_variations
|
fresh_item_data["variations"] = updated_variations
|
||||||
|
|
||||||
upsert_body = {
|
await client.catalog.object.upsert(
|
||||||
"idempotency_key": str(uuid.uuid4()),
|
idempotency_key=str(uuid.uuid4()),
|
||||||
"object": {
|
object={
|
||||||
"type": "ITEM",
|
"type": "ITEM",
|
||||||
"id": item_id,
|
"id": item_id,
|
||||||
"version": fresh_version,
|
"version": fresh_version,
|
||||||
"item_data": fresh_item_data,
|
"item_data": fresh_item_data,
|
||||||
},
|
},
|
||||||
}
|
)
|
||||||
|
|
||||||
await client.catalog.object.upsert(body=upsert_body)
|
|
||||||
print(f"[@INFO] ✓ Successfully updated item {item_id}")
|
print(f"[@INFO] ✓ Successfully updated item {item_id}")
|
||||||
updated_items += 1
|
updated_items += 1
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user