Merge branch '395-resq-api-bug-fixes' into 'master'

Set some defaults to null in get vehicles #395

Closes #395

See merge request jankstudio/resq!439
This commit is contained in:
Kendrick Chan 2020-05-01 06:30:46 +00:00
commit 0ef04e68a3

View file

@ -718,11 +718,11 @@ class APIController extends Controller implements LoggedController
$cvs = $cust->getVehicles();
foreach ($cvs as $cv)
{
$battery_id = '';
$battery_id = null;
if ($cv->getCurrentBattery() != null)
$battery_id = $cv->getCurrentBattery()->getID();
$wty_ex = '';
$wty_ex = null;
if ($cv->getWarrantyExpiration() != null)
$wty_ex = $cv->getWarrantyExpiration()->format('Y-m-d');