File tree 1 file changed +5
-5
lines changed
app/code/Magento/Catalog/Model/Product/Attribute
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCr
106
106
*/
107
107
public function save (\Magento \Catalog \Api \Data \ProductAttributeInterface $ attribute )
108
108
{
109
+ $ attribute ->setEntityTypeId (
110
+ $ this ->eavConfig
111
+ ->getEntityType (\Magento \Catalog \Api \Data \ProductAttributeInterface::ENTITY_TYPE_CODE )
112
+ ->getId ()
113
+ );
109
114
if ($ attribute ->getAttributeId ()) {
110
115
$ existingModel = $ this ->get ($ attribute ->getAttributeCode ());
111
116
@@ -144,11 +149,6 @@ public function save(\Magento\Catalog\Api\Data\ProductAttributeInterface $attrib
144
149
$ attribute ->setBackendModel (
145
150
$ this ->productHelper ->getAttributeBackendModelByInputType ($ attribute ->getFrontendInput ())
146
151
);
147
- $ attribute ->setEntityTypeId (
148
- $ this ->eavConfig
149
- ->getEntityType (\Magento \Catalog \Api \Data \ProductAttributeInterface::ENTITY_TYPE_CODE )
150
- ->getId ()
151
- );
152
152
$ attribute ->setIsUserDefined (1 );
153
153
}
154
154
if (!empty ($ attribute ->getData (AttributeInterface::OPTIONS ))) {
You can’t perform that action at this time.
0 commit comments