Merge branch '551-check-for-null-sku-for-warranty' into 'master'
Add checking for sku. #551 Closes #551 See merge request jankstudio/resq!663
This commit is contained in:
commit
2f918c49cc
1 changed files with 4 additions and 1 deletions
|
|
@ -3045,7 +3045,10 @@ class APIController extends Controller implements LoggedController
|
||||||
}
|
}
|
||||||
|
|
||||||
$sku = $warr_serial->getSKU();
|
$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
|
// TODO: put this in a config file
|
||||||
$image_url = $req->getSchemeAndHttpHost() . '/battery/generic.png';
|
$image_url = $req->getSchemeAndHttpHost() . '/battery/generic.png';
|
||||||
if ($batt != null)
|
if ($batt != null)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue