Fix cases where '3ALPHA' not found for given TIPLOC
This commit is contained in:
parent
129dab5292
commit
b0cba1cd57
@ -60,8 +60,10 @@ def create_crs_list_from_stops(stops):
|
|||||||
for stop in stops:
|
for stop in stops:
|
||||||
if not stop['isPublic']:
|
if not stop['isPublic']:
|
||||||
continue
|
continue
|
||||||
|
try:
|
||||||
loc_ref = ob_client.get_loc_ref_codes_by_tiploc(stop['tiploc'])
|
loc_ref = ob_client.get_loc_ref_codes_by_tiploc(stop['tiploc'])
|
||||||
|
crs_list.append(loc_ref[0]['3ALPHA'])
|
||||||
crs_list.append(loc_ref[0]['3ALPHA'])
|
except Exception as e:
|
||||||
|
print("Unable to load 3ALPHA for: ", stop['tiploc'])
|
||||||
|
crs_list.append("---")
|
||||||
return crs_list
|
return crs_list
|
Loading…
Reference in New Issue
Block a user