Skip to content

Commit a9a3c19

Browse files
committed
8624: Stock status not coming back after qty update
1 parent 4b585d4 commit a9a3c19

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ private function changeIsInStockIfNecessary(StockItemInterface $stockItem)
276276
&& $isInStock
277277
&& !$stockItem->getIsInStock()
278278
&& $stockItem->getOrigData(\Magento\CatalogInventory\Api\Data\StockItemInterface::QTY) == 0
279+
&& $stockItem->getOrigData(\Magento\CatalogInventory\Api\Data\StockItemInterface::QTY) !== null
279280
) {
280281
$stockItem->setIsInStock(true)->setStockStatusChangedAutomaticallyFlag(true);
281282
}

0 commit comments

Comments
 (0)