Skip to content

Commit

Permalink
code modification
Browse files Browse the repository at this point in the history
  • Loading branch information
saphal committed Oct 29, 2018
1 parent cbbaf12 commit 611969d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions app/code/Magento/Review/Model/ResourceModel/Rating.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 611969d

Please sign in to comment.