We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 03d2a1b commit 71faf62Copy full SHA for 71faf62
app/code/Magento/Eav/Model/Entity/Attribute/Backend/Datetime.php
@@ -50,13 +50,20 @@ public function beforeSave($object)
50
}
51
52
if ($value === null) {
53
- $value = $object->getData($attributeName);
+ //$value = $object->getData($attributeName);
54
+ $value = $this->getDefaultValue();
55
56
57
$object->setData($attributeName, $value);
58
$object->setData($attributeName . '_is_formated', true);
59
60
61
+ $defaultValue = $this->getDefaultValue();
62
+ if (is_null($object->getData($attributeName)) && $defaultValue !== null) {
63
+ $object->setData($attributeName, $defaultValue);
64
+ $object->setData($attributeName . '_is_formated', true);
65
+ }
66
+
67
return $this;
68
69
0 commit comments