pim-import 6.1.8 → 6.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -515,13 +515,13 @@ const getProductData = async (productEntry, productDetails) => {
|
|
|
515
515
|
data.fields = await (0, contentful_1.addToRelationFields)(data, "productLine", productLineEntry.sys.id);
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
if (productDetails?.
|
|
519
|
-
const productSubLineEntry = await (0, contentful_1.getEntryByCode)(productDetails.
|
|
518
|
+
if (productDetails?.productSubLine) {
|
|
519
|
+
const productSubLineEntry = await (0, contentful_1.getEntryByCode)(productDetails.productSubLine.code, "topicProductSubLine", "sys");
|
|
520
520
|
if (!productSubLineEntry) {
|
|
521
|
-
(0, logs_1.log)(`The topicProductSubLine with code ${productDetails.
|
|
521
|
+
(0, logs_1.log)(`The topicProductSubLine with code ${productDetails.productSubLine.code} not found`, "WARN");
|
|
522
522
|
}
|
|
523
523
|
else {
|
|
524
|
-
(0, logs_1.log)(`Set productSubLine relation: ${productDetails.
|
|
524
|
+
(0, logs_1.log)(`Set productSubLine relation: ${productDetails.productSubLine.code}`);
|
|
525
525
|
data.fields = await (0, contentful_1.addToRelationFields)(data, "productSubLine", productSubLineEntry.sys.id);
|
|
526
526
|
}
|
|
527
527
|
}
|