Skip to content

Commit

Permalink
[2.3-develop] Forwardport of #11049
Browse files Browse the repository at this point in the history
  • Loading branch information
magento-engcom-team committed Feb 6, 2018
1 parent 15d1a96 commit bf178ca
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ protected function createCategory($name, $parentId)
$category->setIsActive(true);
$category->setIncludeInMenu(true);
$category->setAttributeSetId($category->getDefaultAttributeSetId());
$category->save();
$this->categoriesCache[$category->getId()] = $category;
try {
$category->save();
$this->categoriesCache[$category->getId()] = $category;
} catch (\Exception $e){
$this->addFailedCategory($category, $e);
}

return $category->getId();
}
Expand Down

0 comments on commit bf178ca

Please sign in to comment.