Skip to content

Commit e974fee

Browse files
author
Ankur Kaneria
committed
Merge remote-tracking branch 'mainline/develop' into PR_Branch_ES
2 parents 17b4b14 + a76952f commit e974fee

File tree

3 files changed

+10
-50
lines changed

3 files changed

+10
-50
lines changed

app/code/Magento/CatalogImportExport/Model/Import/Product.php

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,6 @@ protected function _saveProductAttributes(array $attributesData)
11201120
{
11211121
foreach ($attributesData as $tableName => $skuData) {
11221122
$tableData = [];
1123-
$where = [];
11241123
foreach ($skuData as $sku => $attributes) {
11251124
$productId = $this->skuProcessor->getNewSku($sku)['entity_id'];
11261125

@@ -1133,30 +1132,8 @@ protected function _saveProductAttributes(array $attributesData)
11331132
'value' => $storeValue,
11341133
];
11351134
}
1136-
/*
1137-
If the store based values are not provided for a particular store,
1138-
we default to the default scope values.
1139-
In this case, remove all the existing store based values stored in the table.
1140-
*/
1141-
$where[] = $this->_connection->quoteInto(
1142-
'(store_id NOT IN (?)',
1143-
array_keys($storeValues)
1144-
) . $this->_connection->quoteInto(
1145-
' AND attribute_id = ?',
1146-
$attributeId
1147-
) . $this->_connection->quoteInto(
1148-
' AND entity_id = ?)',
1149-
$productId
1150-
);
1151-
if (count($where) >= self::ATTRIBUTE_DELETE_BUNCH) {
1152-
$this->_connection->delete($tableName, implode(' OR ', $where));
1153-
$where = [];
1154-
}
11551135
}
11561136
}
1157-
if (!empty($where)) {
1158-
$this->_connection->delete($tableName, implode(' OR ', $where));
1159-
}
11601137
$this->_connection->insertOnDuplicate($tableName, $tableData, ['value']);
11611138
}
11621139
return $this;

app/code/Magento/CatalogImportExport/Test/Unit/Model/Import/ProductTest.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -504,18 +504,6 @@ public function testSaveProductAttributes()
504504
$this->_connection->expects($this->any())
505505
->method('quoteInto')
506506
->willReturnCallback([$this, 'returnQuoteCallback']);
507-
$this->_connection
508-
->expects($this->once())
509-
->method('delete')
510-
->with(
511-
$this->equalTo($testTable),
512-
$this->equalTo(
513-
'(store_id NOT IN ('
514-
. $storeId . ') AND attribute_id = '
515-
. $attributeId . ' AND entity_id = '
516-
. self::ENTITY_ID . ')'
517-
)
518-
);
519507

520508
$tableData[] = [
521509
'entity_id' => self::ENTITY_ID,

app/code/Magento/Ui/view/base/web/js/form/components/tab_group.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -57,34 +57,29 @@ define([
5757
* @param {Object} elem
5858
*/
5959
validate: function (elem) {
60-
var source = this.source,
61-
result = elem.delegate('validate'),
62-
invalid = false;
60+
var result = elem.delegate('validate'),
61+
invalid;
6362

64-
_.some(result, function (item) {
65-
return !item.valid && (invalid = item.target);
63+
invalid = _.find(result, function (item) {
64+
return !item.valid;
6665
});
6766

68-
if (invalid && !source.get('params.invalid')) {
69-
source.set('params.invalid', true);
70-
67+
if (invalid) {
7168
elem.activate();
72-
invalid.focused(true);
69+
invalid.target.focused(true);
7370
}
71+
72+
return invalid;
7473
},
7574

7675
/**
7776
* Sets 'allValid' property of instance to true, then calls 'validate' method
7877
* of instance for each element.
7978
*/
8079
onValidate: function () {
81-
var elems;
82-
83-
elems = this.elems.sortBy(function (elem) {
80+
this.elems.sortBy(function (elem) {
8481
return !elem.active();
85-
});
86-
87-
elems.forEach(this.validate, this);
82+
}).some(this.validate, this);
8883
}
8984
});
9085
});

0 commit comments

Comments
 (0)