File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed
app/code/Magento/Catalog/Model
dev/tests/unit/testsuite/Magento/Catalog/Model Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -831,7 +831,7 @@ public function eavReindexCallback()
831
831
*/
832
832
public function reindex ()
833
833
{
834
- if ($ this ->_catalogProduct ->isDataForProductCategoryIndexerWasChanged ($ this )) {
834
+ if ($ this ->_catalogProduct ->isDataForProductCategoryIndexerWasChanged ($ this ) || $ this -> isDeleted () ) {
835
835
$ this ->_productFlatIndexerProcessor ->reindexRow ($ this ->getEntityId ());
836
836
$ categoryIndexer = $ this ->indexerRegistry ->get (Indexer \Product \Category::INDEXER_ID );
837
837
if (!$ categoryIndexer ->isScheduled ()) {
Original file line number Diff line number Diff line change @@ -345,6 +345,7 @@ public function testIsInStock()
345
345
346
346
public function testIndexerAfterDeleteCommitProduct ()
347
347
{
348
+ $ this ->model ->isDeleted (true );
348
349
$ this ->categoryIndexerMock ->expects ($ this ->once ())->method ('reindexRow ' );
349
350
$ this ->productFlatProcessor ->expects ($ this ->once ())->method ('reindexRow ' );
350
351
$ this ->productPriceProcessor ->expects ($ this ->once ())->method ('reindexRow ' );
You can’t perform that action at this time.
0 commit comments