Skip to content

Commit 75327f5

Browse files
author
Bohdan Korablov
committed
Merge remote-tracking branch 'tangoc/MAGETWO-44327' into new_pr_bugs
2 parents a2a1d36 + 864fd9e commit 75327f5

File tree

1 file changed

+4
-0
lines changed
  • app/code/Magento/CatalogRule/Model

1 file changed

+4
-0
lines changed

app/code/Magento/CatalogRule/Model/Rule.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,10 @@ protected function _getWebsitesMap()
342342
$map = [];
343343
$websites = $this->_storeManager->getWebsites(true);
344344
foreach ($websites as $website) {
345+
// Continue if website has no store to be able to create catalog rule for website without store
346+
if ($website->getDefaultStore() === null) {
347+
continue;
348+
}
345349
$map[$website->getId()] = $website->getDefaultStore()->getId();
346350
}
347351
return $map;

0 commit comments

Comments
 (0)