Make sure the dpt airport is known before trying to parse the route

This commit is contained in:
Nabeel Shahzad 2018-01-05 14:33:22 -06:00
parent 5719971a13
commit 4ee6830181

View File

@ -113,6 +113,11 @@ class PIREPService extends BaseService
return $pirep;
}
if(!$pirep->dpt_airport) {
Log::error('saveRoute: dpt_airport not found: '.$pirep->dpt_airport_id);
return $pirep;
}
$route = $this->geoSvc->getCoordsFromRoute(
$pirep->dpt_airport_id,
$pirep->arr_airport_id,