Skip to content
This repository has been archived by the owner on Mar 9, 2023. It is now read-only.

Commit

Permalink
Merge 7436a5b into 55ecdfb
Browse files Browse the repository at this point in the history
  • Loading branch information
igormukhingmailcom committed Nov 8, 2021
2 parents 55ecdfb + 7436a5b commit a56c0f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ protected function normalizeProduct(EntityWithFamilyVariantInterface $product)
{
$normalizedProduct = $this->getNormalizer()->normalize($product, 'external_api');

# @see https://github.com/flagbit/akeneo-product-cloner/issues/24
if ($normalizedProduct['values'] instanceof \stdClass) {
$normalizedProduct['values'] = [];
}

while ($parent = $product->getParent()) {
foreach ($parent->getValuesForVariation() as $value) {
//this workaround removes the attributes of all parent models, as the getValues() Method,
Expand Down

0 comments on commit a56c0f6

Please sign in to comment.