Skip to content

Commit

Permalink
MAGETWO-52079: [GITHUB] Order Repository GetList Method always return…
Browse files Browse the repository at this point in the history
…s the same shipping address for all orders #4019
  • Loading branch information
Mulderua committed May 4, 2016
1 parent c1b7c35 commit b1dd1c6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/code/Magento/Sales/Model/OrderRepository.php
Expand Up @@ -10,7 +10,7 @@
use Magento\Sales\Model\Order\ShippingAssignmentBuilder;
use Magento\Sales\Api\Data\OrderSearchResultInterfaceFactory as SearchResultFactory;
use Magento\Sales\Api\Data\OrderExtensionInterface;
use Magento\Sales\Api\Data\OrderExtension;
use Magento\Sales\Api\Data\OrderExtensionFactory;
use Magento\Sales\Api\Data\OrderInterface;
use Magento\Sales\Api\Data\ShippingAssignmentInterface;
use Magento\Framework\Exception\NoSuchEntityException;
Expand All @@ -34,9 +34,9 @@ class OrderRepository implements \Magento\Sales\Api\OrderRepositoryInterface
protected $searchResultFactory = null;

/**
* @var OrderExtension
* @var OrderExtensionFactory
*/
private $orderExtension;
private $orderExtensionFactory;

/**
* @var ShippingAssignmentBuilder
Expand Down Expand Up @@ -173,7 +173,7 @@ private function setShippingAssignments(OrderInterface $order)
$extensionAttributes = $order->getExtensionAttributes();

if ($extensionAttributes === null) {
$extensionAttributes = $this->getOrderExtensionDependency()->create();
$extensionAttributes = $this->getOrderExtensionDependencyFactory()->create();
} elseif ($extensionAttributes->getShippingAssignments() !== null) {
return;
}
Expand All @@ -189,14 +189,14 @@ private function setShippingAssignments(OrderInterface $order)
* @return OrderExtension
* @deprecated
*/
private function getOrderExtensionDependency()
private function getOrderExtensionDependencyFactory()
{
if (!$this->orderExtension instanceof OrderExtension) {
$this->orderExtension = \Magento\Framework\App\ObjectManager::getInstance()->get(
if (!$this->orderExtensionFactory instanceof OrderExtensionFactory) {
$this->orderExtensionFactory = \Magento\Framework\App\ObjectManager::getInstance()->get(
'\Magento\Sales\Api\Data\OrderExtensionFactory'
);
}
return $this->orderExtension;
return $this->orderExtensionFactory;
}

/**
Expand Down

0 comments on commit b1dd1c6

Please sign in to comment.