Staging #1663
3 changed files with 3 additions and 3 deletions
|
|
@ -270,7 +270,7 @@ class BatteryManufacturerController extends Controller
|
|||
|
||||
// get row data
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$all_batts = $em->getRepository(Battery::class)->findAll();
|
||||
$all_batts = $em->getRepository(Battery::class)->findBy(['flag_active' => true]);
|
||||
|
||||
foreach ($all_batts as $battery)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1043,7 +1043,7 @@ class RiderAppController extends APIController
|
|||
if ($rider == null)
|
||||
return new APIResponse(false, 'No rider found.');
|
||||
|
||||
$batts = $em->getRepository(Battery::class)->findAll();
|
||||
$batts = $em->getRepository(Battery::class)->findBy(['flag_active' => true]);
|
||||
$models = $em->getRepository(BatteryModel::class)->findAll();
|
||||
$sizes = $em->getRepository(BatterySize::class)->findAll();
|
||||
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ class VehicleController extends Controller
|
|||
// get row data
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$vobj = $em->getRepository(Vehicle::class)->find($req->request->get('vehicle_id'));
|
||||
$all_batts = $em->getRepository(Battery::class)->findAll();
|
||||
$all_batts = $em->getRepository(Battery::class)->findBy('flag_active' => true);
|
||||
|
||||
if (empty($vobj))
|
||||
throw $this->createNotFoundException('The item does not exist');
|
||||
|
|
|
|||
Loading…
Reference in a new issue