Skip to content

Commit 4a59b3e

Browse files
committed
MC-36830: [Issue] Fix for empty category field values in REST calls
1 parent 61cb299 commit 4a59b3e

File tree

2 files changed

+0
-45
lines changed

2 files changed

+0
-45
lines changed

app/code/Magento/Elasticsearch/Test/Unit/Model/ResourceModel/IndexTest.php

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -417,48 +417,6 @@ public function testGetCategoryProductIndexData()
417417
);
418418
}
419419

420-
/**
421-
* Test getCategoryProductIndexData method for all stores
422-
*/
423-
public function testGetCategoryProductIndexDataForAllStores()
424-
{
425-
$connection = $this->connection;
426-
$select = $this->select;
427-
428-
$connection->expects($this->any())
429-
->method('select')
430-
->willReturn($select);
431-
432-
$select->expects($this->any())
433-
->method('from')
434-
->with(
435-
['catalog_category_product_index'],
436-
['category_id', 'product_id', 'position', 'store_id']
437-
)->willReturnSelf();
438-
439-
$select->expects($this->any())
440-
->method('where')
441-
->willReturnSelf();
442-
443-
$connection->expects($this->once())
444-
->method('fetchAll')
445-
->with($select)
446-
->willReturn([[
447-
'product_id' => 1,
448-
'category_id' => 1,
449-
'position' => 1,
450-
]]);
451-
452-
$this->assertEquals(
453-
[
454-
1 => [
455-
1 => 1,
456-
],
457-
],
458-
$this->model->getCategoryProductIndexData(0, [1])
459-
);
460-
}
461-
462420
/**
463421
* Test getMovedCategoryProductIds method
464422
*/

lib/internal/Magento/Framework/Indexer/ScopeResolver/IndexScopeResolver.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ public function resolve($index, array $dimensions)
4444
{
4545
$tableNameParts = [];
4646
foreach ($dimensions as $dimension) {
47-
if (!$dimension->getValue()) {
48-
continue;
49-
}
5047
switch ($dimension->getName()) {
5148
case 'scope':
5249
$tableNameParts[$dimension->getName()] = $dimension->getName() . $this->getScopeId($dimension);

0 commit comments

Comments
 (0)