Skip to content

Commit c7e3fda

Browse files
author
Olexii Korshenko
committed
MAGETWO-32775: Prepare pull request for Checkout related modules MSC
- fixed REST tests
1 parent 0ffd732 commit c7e3fda

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,9 @@ public function assignCustomer($cartId, $customerId, $storeId)
167167
}
168168
try {
169169
$this->quoteRepository->getForCustomer($customerId);
170-
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
171170
throw new StateException('Cannot assign customer to the given cart. Customer already has active cart.');
171+
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
172+
172173
}
173174

174175
$quote->setCustomer($customer);
@@ -205,8 +206,9 @@ protected function createCustomerCart($storeId)
205206

206207
try {
207208
$this->quoteRepository->getActiveForCustomer($this->userContext->getUserId());
208-
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
209209
throw new CouldNotSaveException('Cannot create quote');
210+
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
211+
210212
}
211213

212214
/** @var \Magento\Quote\Model\Quote $quote */

0 commit comments

Comments
 (0)