diff --git a/app/code/Magento/CatalogRule/Model/Rule.php b/app/code/Magento/CatalogRule/Model/Rule.php index 92fe0e211685f710216e13c1bf8e00d600d2ac14..99eb4752f691cb88006c3cd108782aa53600e991 100644 --- a/app/code/Magento/CatalogRule/Model/Rule.php +++ b/app/code/Magento/CatalogRule/Model/Rule.php @@ -462,7 +462,10 @@ class Rule extends \Magento\Rule\Model\AbstractModel public function afterSave() { if ($this->isObjectNew()) { - $this->_ruleProductProcessor->reindexList($this->getMatchingProductIds()); + $this->getMatchingProductIds(); + if (!empty($this->_productIds) && is_array($this->_productIds)) { + $this->_ruleProductProcessor->reindexList($this->_productIds); + } } else { $this->_ruleProductProcessor->getIndexer()->invalidate(); }