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

Commit

Permalink
Add compatibility with Akeneo 3.2 in ProductModel clone
Browse files Browse the repository at this point in the history
The family key was added to the normalized ProductModel
which caused the error on cloning one in Akeneo 3.2
  • Loading branch information
flagbird committed Feb 21, 2020
1 parent 7249c76 commit edad20b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Controller/ProductModelController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public function cloneAction(Request $request) : JsonResponse

// clone product using Akeneo normalizer and updater for reusing code
$normalizedProduct = $this->normalizeProduct($productModel);
unset($normalizedProduct['family']);
$this->productModelUpdater->update($cloneProductModel, $normalizedProduct);
$this->productModelUpdater->update($cloneProductModel, $content);
$cloneProductModel->setCode($content['code']);
Expand Down

0 comments on commit edad20b

Please sign in to comment.