Skip to content

Commit d64ec75

Browse files
committed
Merge remote-tracking branch 'mainline/2.2-develop' into PANDA-FIXES-2.2
2 parents 1924a99 + b208fc4 commit d64ec75

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

app/code/Magento/CatalogRule/Plugin/Indexer/Category.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ public function afterSave(
3535
\Magento\Catalog\Model\Category $result
3636
) {
3737
/** @var \Magento\Catalog\Model\Category $result */
38-
$productIds = $result->getAffectedProductIds();
39-
if ($productIds && !$this->productRuleProcessor->isIndexerScheduled()) {
38+
$productIds = $result->getChangedProductIds();
39+
if (!empty($productIds) && !$this->productRuleProcessor->isIndexerScheduled()) {
4040
$this->productRuleProcessor->reindexList($productIds);
4141
}
4242
return $result;

app/code/Magento/CatalogRule/Test/Unit/Plugin/Indexer/CategoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function setUp()
3232
);
3333
$this->subject = $this->createPartialMock(
3434
\Magento\Catalog\Model\Category::class,
35-
['getAffectedProductIds', '__wakeUp']
35+
['getChangedProductIds', '__wakeUp']
3636
);
3737

3838
$this->plugin = (new ObjectManager($this))->getObject(
@@ -46,7 +46,7 @@ protected function setUp()
4646
public function testAfterSaveWithoutAffectedProductIds()
4747
{
4848
$this->subject->expects($this->any())
49-
->method('getAffectedProductIds')
49+
->method('getChangedProductIds')
5050
->will($this->returnValue([]));
5151

5252
$this->productRuleProcessor->expects($this->never())
@@ -60,7 +60,7 @@ public function testAfterSave()
6060
$productIds = [1, 2, 3];
6161

6262
$this->subject->expects($this->any())
63-
->method('getAffectedProductIds')
63+
->method('getChangedProductIds')
6464
->will($this->returnValue($productIds));
6565

6666
$this->productRuleProcessor->expects($this->once())

0 commit comments

Comments
 (0)