fix: wb barcodes

This commit is contained in:
2024-09-23 20:19:36 +03:00
parent 0b1395f86d
commit 0e54b0edd3

View File

@@ -100,9 +100,10 @@ class WildberriesProductSynchronizer(BaseProductSynchronizer):
new_images.append(image)
return new_images
async def _process_product(self, card, size_value, nm_uuid):
async def _process_product(self, card, size_value, nm_uuid, size):
product = await self._create_product(card, size_value)
barcodes = await self._create_barcodes(product, card.get('sizes')[0].get('skus') or [])
barcodes = await self._create_barcodes(product, size.get('skus') or [])
images = await self._create_images(product, card.get('photos') or [])
wildberries_product = await self._create_wildberries_product(product, nm_uuid)
@@ -126,7 +127,8 @@ class WildberriesProductSynchronizer(BaseProductSynchronizer):
await self._process_product(
card,
size_value,
nm_uuid
nm_uuid,
size
)
await self._write()
@@ -176,7 +178,8 @@ class WildberriesProductSynchronizer(BaseProductSynchronizer):
await self._process_product(
card,
size_value,
nm_uuid
nm_uuid,
size
)
await self._write()