Skip to content

Commit ce84e0c

Browse files
author
Cari Spruiell
committed
MAGETWO-64047: WebAPI: It's impossible to empty numeric fields after they're set
1 parent 46a5ae9 commit ce84e0c

File tree

1 file changed

+1
-0
lines changed
  • app/code/Magento/Catalog/Model/Product/Attribute/Backend

1 file changed

+1
-0
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/Backend/Price.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public function afterSave($object)
128128
$attribute = $this->getAttribute();
129129
$attributeCode = $attribute->getAttributeCode();
130130
$value = $object->getData($attributeCode);
131+
// $value may be passed as null to unset the attribute
131132
if ($value === null || (float)$value > 0) {
132133
if ($attribute->isScopeWebsite() && $object->getStoreId() != \Magento\Store\Model\Store::DEFAULT_STORE_ID) {
133134
if ($this->isUseDefault($object)) {

0 commit comments

Comments
 (0)