From 56a0f117de65f279d1404212858e16d46bc8288f Mon Sep 17 00:00:00 2001 From: saphal Date: Mon, 29 Oct 2018 11:04:31 +0530 Subject: [PATCH] code modification --- app/code/Magento/Review/Model/ResourceModel/Rating.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/code/Magento/Review/Model/ResourceModel/Rating.php b/app/code/Magento/Review/Model/ResourceModel/Rating.php index 79609a9afe41f..debaf61c4dd4b 100644 --- a/app/code/Magento/Review/Model/ResourceModel/Rating.php +++ b/app/code/Magento/Review/Model/ResourceModel/Rating.php @@ -433,10 +433,7 @@ public function getReviewSummary($object, $onlyForCurrentStore = true) $data = $connection->fetchAll($select, [':review_id' => $object->getReviewId()]); - $currentStore = $this->_storeManager->getStore()->setId(); - if ($this->_state->getAreaCode() == "adminhtml") { - $currentStore = false; - } + $currentStore = ($this->_state->getAreaCode() == "adminhtml") ? false : $this->_storeManager->getStore()->getId(); if ($onlyForCurrentStore) { foreach ($data as $row) {