Skip to content

Commit b95387d

Browse files
ENGCOM-3180: [Forwardport] Fix for custom product attribute changing 'backend_type' when 'is_use… #18570
- Merge Pull Request #18570 from gelanivishal/magento2:2.3-develop-PR-port-18196 - Merged commits: 1. 40e128c
2 parents 708017a + 40e128c commit b95387d

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
@@ -230,14 +230,14 @@ public function execute()
230230
$data['backend_model'] = $this->productHelper->getAttributeBackendModelByInputType(
231231
$data['frontend_input']
232232
);
233+
234+
if ($model->getIsUserDefined() === null) {
235+
$data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']);
236+
}
233237
}
234238

235239
$data += ['is_filterable' => 0, 'is_filterable_in_search' => 0];
236240

237-
if ($model->getIsUserDefined() === null || $model->getIsUserDefined() != 0) {
238-
$data['backend_type'] = $model->getBackendTypeByInput($data['frontend_input']);
239-
}
240-
241241
$defaultValueField = $model->getDefaultValueByInput($data['frontend_input']);
242242
if ($defaultValueField) {
243243
$data['default_value'] = $this->getRequest()->getParam($defaultValueField);

0 commit comments

Comments
 (0)