Skip to content

Commit 0205923

Browse files
committed
ACPT-1408: Investigate 1m call on 1k rules
1 parent a75fb60 commit 0205923

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/code/Magento/SalesRule/Model/ResourceModel/Rule/Collection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use Magento\Quote\Model\Quote\Address;
1414
use Magento\SalesRule\Api\Data\CouponInterface;
1515
use Magento\SalesRule\Api\Data\RuleInterface;
16-
use Magento\SalesRule\Api\Data\RuleInterfaceFactory;
1716
use Magento\SalesRule\Model\Coupon;
1817
use Magento\SalesRule\Model\Rule;
1918

@@ -87,11 +86,13 @@ public function __construct(
8786
\Magento\Framework\DB\Adapter\AdapterInterface $connection = null,
8887
\Magento\Framework\Model\ResourceModel\Db\AbstractDb $resource = null,
8988
Json $serializer = null,
90-
MetadataPool $metadataPool = null,
89+
MetadataPool $metadataPool = null
9190
) {
9291
parent::__construct($entityFactory, $logger, $fetchStrategy, $eventManager, $connection, $resource);
9392
$this->_date = $date;
9493
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()->get(Json::class);
94+
$this->metadataPool = $serializer ?:
95+
\Magento\Framework\App\ObjectManager::getInstance()->get(MetadataPool::class);
9596
$this->_associatedEntitiesMap = $this->getAssociatedEntitiesMap();
9697
$this->_setIdFieldName($this->metadataPool->getMetadata(RuleInterface::class)->getLinkField());
9798
}

0 commit comments

Comments
 (0)