Resolve "APIController changes to handle duplicate customer mobile numbers" #1133

Merged
korina.cordero merged 2 commits from 277-apicontroller-changes-to-handle-duplicate-customer-mobile-numbers into master 2019-11-26 05:47:27 +00:00
Showing only changes of commit bf86a46082 - Show all commits

View file

@ -2191,7 +2191,8 @@ class APIController extends Controller
protected function findCustomerByNumber($number)
{
$customers = $this->em->getRepository(Customer::class)->findBy(['phone_mobile' => $number]);
$em = $this->getDoctrine()->getManager();
$customers = $em->getRepository(Customer::class)->findBy(['phone_mobile' => $number]);
// find the customer with the most number of cars
$car_count = 0;