Fix for errors found during testing. #277

This commit is contained in:
Korina Cordero 2019-11-21 08:03:33 +00:00
parent 0adffd92d7
commit bf86a46082

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;