Skip to content

Commit

Permalink
Prevent duplicate attribute items
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Dec 28, 2018
1 parent ef54dd3 commit 41eb03e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/mshoplib/setup/default/DemoAddProductData.php
Expand Up @@ -178,9 +178,9 @@ protected function addRefItems( \Aimeos\MShop\Common\Item\ListRef\Iface $item, a
try
{
$manager = \Aimeos\MShop\Factory::createManager( $context, 'attribute' );
$refItem = $manager->findItem( $refItem->getCode, [], 'product', $refItem->getType() );
$refItem = $manager->findItem( $data['attribute.code'], [], $domain, $data['attribute.type'] );
}
catch( \Aimeos\DB\Exception $e ) {}
catch( \Aimeos\MShop\Exception $e ) {}

$refItem = $this->addRefItems( $refItem, $data );

Expand Down

0 comments on commit 41eb03e

Please sign in to comment.