Add checking for sku. #551
This commit is contained in:
parent
273cd0bd59
commit
d02f0f7d51
1 changed files with 4 additions and 1 deletions
|
|
@ -3045,7 +3045,10 @@ class APIController extends Controller implements LoggedController
|
|||
}
|
||||
|
||||
$sku = $warr_serial->getSKU();
|
||||
$batt = $em->getRepository(SAPBattery::class)->find($sku);
|
||||
$batt = null;
|
||||
if ($sku != null)
|
||||
$batt = $em->getRepository(SAPBattery::class)->find($sku);
|
||||
|
||||
// TODO: put this in a config file
|
||||
$image_url = $req->getSchemeAndHttpHost() . '/battery/generic.png';
|
||||
if ($batt != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue