From 4672cfd99f1d5f1580878cd381532ddade2e143f Mon Sep 17 00:00:00 2001 From: Jose Ortega Date: Fri, 12 Aug 2022 11:28:14 +0200 Subject: [PATCH] Fix for upgrading module from 8.x to 9.x Related to https://github.com/bazaarvoice/magento2-extension/issues/77 --- Setup/Patch/Data/UpgradeBvDataAtttribute.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Setup/Patch/Data/UpgradeBvDataAtttribute.php b/Setup/Patch/Data/UpgradeBvDataAtttribute.php index 00025c9..74306a5 100644 --- a/Setup/Patch/Data/UpgradeBvDataAtttribute.php +++ b/Setup/Patch/Data/UpgradeBvDataAtttribute.php @@ -153,7 +153,7 @@ public function apply() $eavSetup = $this->categorySetupFactory->create(['setup' => $this->moduleDataSetup]); $entityTypeId = $eavSetup->getEntityTypeId(Product::ENTITY); - if ($eavSetup->getAttribute($entityTypeId, 'bv_feed_exclude')) { + if ($eavSetup->getAttribute($entityTypeId, 'bv_feed_exclude') && !$eavSetup->getAttribute($entityTypeId, 'bv_feed_include')) { $eavSetup->updateAttribute( $entityTypeId, 'bv_feed_exclude', @@ -264,4 +264,4 @@ public static function getVersion() { return '9.0.0'; } -} \ No newline at end of file +}