Skip to content

Commit 3fd54a4

Browse files
author
Stanislav Idolov
authored
ENGCOM-3180: [Forwardport] Fix for custom product attribute changing 'backend_type' when 'is_use… #18570
2 parents a0b3609 + b95387d commit 3fd54a4

File tree

1 file changed

+4
-4
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute

1 file changed

+4
-4
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,14 @@ public function execute()
259259
$data['backend_model'] = $this->productHelper->getAttributeBackendModelByInputType(
260260
$data['frontend_input']
261261
);
262+
263+
if ($model->getIsUserDefined() === null) {
264+
$data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']);
265+
}
262266
}
263267

264268
$data += ['is_filterable' => 0, 'is_filterable_in_search' => 0];
265269

266-
if ($model->getIsUserDefined() === null || $model->getIsUserDefined() != 0) {
267-
$data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']);
268-
}
269-
270270
$defaultValueField = $model->getDefaultValueByInput($data['frontend_input']);
271271
if ($defaultValueField) {
272272
$data['default_value'] = $this->getRequest()->getParam($defaultValueField);

0 commit comments

Comments
 (0)