Merge branch '624-app-error-when-customer-requests-tire-assistance' into 'master-fix'

Resolve "App error when customer requests tire assistance"

See merge request jankstudio/resq!738
This commit is contained in:
Kendrick Chan 2021-09-29 07:03:50 +00:00
commit 697fa20071

View file

@ -2897,10 +2897,14 @@ class APIController extends Controller implements LoggedController
}
}
// add battery to items
$sku = $batt->getSAPCode();
if (!empty($sku))
$hub_criteria->addItem($batt->getSAPCode(), 1);
// check if batt is null
if ($batt != null)
{
// add battery to items
$sku = $batt->getSAPCode();
if (!empty($sku))
$hub_criteria->addItem($batt->getSAPCode(), 1);
}
// get customer id. No JO id at this point
$customer_id = $cust->getID();