Skip to content

Commit 99bebb5

Browse files
committed
MAGETWO-69967: Double re-indexation of configurable product
1 parent 22b7543 commit 99bebb5

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,6 @@ public function save(\Magento\CatalogInventory\Api\Data\StockItemInterface $stoc
181181
$stockItem->setStockId($stockItem->getStockId());
182182

183183
$this->resource->save($stockItem);
184-
185-
$this->indexProcessor->reindexRow($stockItem->getProductId());
186184
} catch (\Exception $exception) {
187185
throw new CouldNotSaveException(__('Unable to save Stock Item'), $exception);
188186
}

app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockItemRepositoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public function testSave()
314314
->method('save')
315315
->with($this->stockItemMock)
316316
->willReturnSelf();
317-
$this->indexProcessorMock->expects($this->once())->method('reindexRow')->with($productId);
317+
$this->indexProcessorMock->expects($this->never())->method('reindexRow')->with($productId);
318318

319319
$this->assertEquals($this->stockItemMock, $this->model->save($this->stockItemMock));
320320
}

0 commit comments

Comments
 (0)