Skip to content

Commit 6f64661

Browse files
author
Maksym Aposov
committed
MAGETWO-29334: Impossible to save existent Grouped Product with no child items
1 parent b7e30e1 commit 6f64661

File tree

1 file changed

+2
-2
lines changed
  • app/code/Magento/GroupedProduct/Model/Product/Initialization/Helper/ProductLinks/Plugin

1 file changed

+2
-2
lines changed

app/code/Magento/GroupedProduct/Model/Product/Initialization/Helper/ProductLinks/Plugin/Grouped.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ public function beforeInitializeLinks(
2525
array $links
2626
) {
2727
if ($product->getTypeId() == TypeGrouped::TYPE_CODE && !$product->getGroupedReadonly()) {
28-
$links = isset($links['associated']) ? $links['associated'] : [];
29-
$product->setGroupedLinkData($links);
28+
$links = isset($links['associated']) ? $links['associated'] : $product->getGroupedLinkData();
29+
$product->setGroupedLinkData((array)$links);
3030
}
3131
}
3232
}

0 commit comments

Comments
 (0)