Skip to content

Commit c6d166b

Browse files
p-bystritskyhostep
authored andcommitted
#12205: Stock inventory reindex bug.
(cherry picked from commit 20d7afb)
1 parent 68d2137 commit c6d166b

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock

1 file changed

+1
-1
lines changed

app/code/Magento/CatalogInventory/Model/ResourceModel/Indexer/Stock/DefaultStock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ protected function _prepareIndexTable($entityIds = null)
292292
*/
293293
protected function _updateIndex($entityIds)
294294
{
295+
$this->deleteOldRecords($entityIds);
295296
$connection = $this->getConnection();
296297
$select = $this->_getStockStatusSelect($entityIds, true);
297298
$select = $this->getQueryProcessorComposite()->processQuery($select, $entityIds, true);
@@ -314,7 +315,6 @@ protected function _updateIndex($entityIds)
314315
}
315316
}
316317

317-
$this->deleteOldRecords($entityIds);
318318
$this->_updateIndexTable($data);
319319

320320
return $this;

0 commit comments

Comments
 (0)