Skip to content

Commit 2330cea

Browse files
MC-40773: Custom Product Attribute Not Saving Blank If its 0
1 parent ceccbf5 commit 2330cea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Initialization/Helper/AttributeFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,6 @@ private function isAttributeShouldNotBeUpdated(Product $product, array $useDefau
102102
{
103103
$considerUseDefaultsAttribute = !isset($useDefaults[$attribute]) || $useDefaults[$attribute] === '1';
104104

105-
return ($value === '' && $considerUseDefaultsAttribute && !$product->getData($attribute));
105+
return ($value === '' && $considerUseDefaultsAttribute && ($product->getData($attribute) === null));
106106
}
107107
}

0 commit comments

Comments
 (0)