From 0e54b0edd344b868a000080d3fcabf04e8fa583c Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 23 Sep 2024 20:19:36 +0300 Subject: [PATCH] fix: wb barcodes --- marketplaces/wildberries/core.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/marketplaces/wildberries/core.py b/marketplaces/wildberries/core.py index b2996c6..eb96dbf 100644 --- a/marketplaces/wildberries/core.py +++ b/marketplaces/wildberries/core.py @@ -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()