Skip to content

Commit 756a142

Browse files
author
Oleksandr Iegorov
committed
ACP2E-766: Error during Category import 'Integrity constraint violation: 1062 Duplicate entry'
1 parent 9739336 commit 756a142

File tree

1 file changed

+2
-4
lines changed
  • app/code/Magento/CatalogImportExport/Model/Import/Product

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,8 @@ protected function isValidAttributes()
310310
if ($entityTypeModel) {
311311
foreach ($this->_rowData as $attrCode => $attrValue) {
312312
$attrParams = $entityTypeModel->retrieveAttributeFromCache($attrCode);
313-
if ($attrCode === Product::COL_CATEGORY) {
314-
if (!$this->isCategoriesValid($attrValue)) {
315-
return false;
316-
}
313+
if ($attrCode === Product::COL_CATEGORY && $attrValue) {
314+
$this->isCategoriesValid($attrValue);
317315
} elseif ($attrParams) {
318316
$this->isAttributeValid($attrCode, $attrParams, $this->_rowData);
319317
}

0 commit comments

Comments
 (0)