File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
app/code/Magento/Catalog/Model Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -947,8 +947,13 @@ public function beforeSave()
947
947
&& !$ this ->authorization ->isAllowed ('Magento_Catalog::edit_category_design ' )
948
948
) {
949
949
foreach ($ this ->_designAttributes as $ attributeCode ) {
950
- $ this ->setData ($ attributeCode , $ this ->getOrigData ($ attributeCode ));
951
- $ this ->setCustomAttribute ($ attributeCode , $ this ->getOrigData ($ attributeCode ));
950
+ $ this ->setData ($ attributeCode , $ value = $ this ->getOrigData ($ attributeCode ));
951
+ if (!empty ($ this ->_data [self ::CUSTOM_ATTRIBUTES ])
952
+ && array_key_exists ($ attributeCode , $ this ->_data [self ::CUSTOM_ATTRIBUTES ])
953
+ ) {
954
+ //In case custom attribute were used to update the entity.
955
+ $ this ->_data [self ::CUSTOM_ATTRIBUTES ][$ attributeCode ]->setValue ($ value );
956
+ }
952
957
}
953
958
}
954
959
You can’t perform that action at this time.
0 commit comments