Skip to content

Commit bf178ca

Browse files
[2.3-develop] Forwardport of #11049
1 parent 15d1a96 commit bf178ca

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product/CategoryProcessor.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,12 @@ protected function createCategory($name, $parentId)
119119
$category->setIsActive(true);
120120
$category->setIncludeInMenu(true);
121121
$category->setAttributeSetId($category->getDefaultAttributeSetId());
122-
$category->save();
123-
$this->categoriesCache[$category->getId()] = $category;
122+
try {
123+
$category->save();
124+
$this->categoriesCache[$category->getId()] = $category;
125+
} catch (\Exception $e){
126+
$this->addFailedCategory($category, $e);
127+
}
124128

125129
return $category->getId();
126130
}

0 commit comments

Comments
 (0)