From edad20b8e86bf7ad433aafce02e0aa0eafc54324 Mon Sep 17 00:00:00 2001 From: Claudio Zizza Date: Fri, 21 Feb 2020 16:55:09 +0100 Subject: [PATCH] Add compatibility with Akeneo 3.2 in ProductModel clone The family key was added to the normalized ProductModel which caused the error on cloning one in Akeneo 3.2 --- src/Controller/ProductModelController.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Controller/ProductModelController.php b/src/Controller/ProductModelController.php index 7aa081f..041bad9 100644 --- a/src/Controller/ProductModelController.php +++ b/src/Controller/ProductModelController.php @@ -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']);