From 31f012448232d64bb2985fff517b5a147283551a Mon Sep 17 00:00:00 2001 From: Fabrizio Balliano Date: Wed, 10 May 2023 23:38:28 +0100 Subject: [PATCH] Fixed model hasDataCchanges is true right after loading --- app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php b/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php index b988a47590b..d24c447c747 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php +++ b/app/code/core/Mage/Eav/Model/Entity/Attribute/Abstract.php @@ -145,6 +145,8 @@ public function loadByCode($entityType, $code) $this->_getResource()->loadByCode($this, $entityTypeId, $code); } $this->_afterLoad(); + $this->setOrigData(); + $this->_hasDataChanges = false; Varien_Profiler::stop('_LOAD_ATTRIBUTE_BY_CODE__'); return $this; }