Skip to content

Commit

Permalink
Revert afterSave to original implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
slackerzz committed May 28, 2019
1 parent 9d103b7 commit 1f14e7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions app/code/Magento/Customer/Model/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,7 @@ public function getEntityTypeId()
*/
public function afterSave()
{
$indexer = $this->indexerRegistry->get(Customer::CUSTOMER_GRID_INDEXER_ID);
if ($indexer->getState()->getStatus() != StateInterface::STATUS_VALID) {
$this->_getResource()->addCommitCallback([$this, 'reindex']);
}
$this->_getResource()->addCommitCallback([$this, 'reindex']);
return parent::afterSave();
}

Expand Down
5 changes: 1 addition & 4 deletions app/code/Magento/Customer/Model/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1072,10 +1072,7 @@ public function beforeDelete()
*/
public function afterSave()
{
$indexer = $this->indexerRegistry->get(self::CUSTOMER_GRID_INDEXER_ID);
if ($indexer->getState()->getStatus() != StateInterface::STATUS_VALID) {
$this->_getResource()->addCommitCallback([$this, 'reindex']);
}
$this->_getResource()->addCommitCallback([$this, 'reindex']);
return parent::afterSave();
}

Expand Down

0 comments on commit 1f14e7d

Please sign in to comment.