Skip to content

Commit

Permalink
Fix for upgrading module from 8.x to 9.x
Browse files Browse the repository at this point in the history
Related to bazaarvoice#77
  • Loading branch information
Jose Ortega committed Aug 12, 2022
1 parent 80d4b7d commit 4672cfd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Setup/Patch/Data/UpgradeBvDataAtttribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -264,4 +264,4 @@ public static function getVersion()
{
return '9.0.0';
}
}
}

0 comments on commit 4672cfd

Please sign in to comment.