Remove duplicate request to get the $deliveryAddress

This commit is contained in:
touffies
2013-11-08 16:28:16 +01:00
parent b5bd38b2aa
commit 15b1acd2e6

View File

@@ -71,7 +71,6 @@ class OrderController extends BaseFrontController
$deliveryModule = ModuleQuery::create()->findPk($deliveryModuleId);
/* check that the delivery address belongs to the current customer */
$deliveryAddress = AddressQuery::create()->findPk($deliveryAddressId);
if ($deliveryAddress->getCustomerId() !== $this->getSecurityContext()->getCustomerUser()->getId()) {
throw new \Exception("Delivery address does not belong to the current customer");
}