Fixed the case when stations is None
This commit is contained in:
parent
76774fc9cb
commit
94472ba945
@ -198,12 +198,14 @@ class Client():
|
|||||||
if isinstance(station_to, Stop):
|
if isinstance(station_to, Stop):
|
||||||
station_to = station_to.ext_id
|
station_to = station_to.ext_id
|
||||||
|
|
||||||
|
if stations != None:
|
||||||
new_stations = []
|
new_stations = []
|
||||||
for stop in stations:
|
for stop in stations:
|
||||||
if isinstance(stop, Stop):
|
if isinstance(stop, Stop):
|
||||||
new_stations.append(stop.ext_id)
|
new_stations.append(stop.ext_id)
|
||||||
else:
|
else:
|
||||||
new_stations.append(stop)
|
new_stations.append(stop)
|
||||||
|
stations = new_stations
|
||||||
|
|
||||||
if search_mode == None:
|
if search_mode == None:
|
||||||
search_mode = None
|
search_mode = None
|
||||||
@ -235,7 +237,7 @@ class Client():
|
|||||||
companies=companies,
|
companies=companies,
|
||||||
lines=lines,
|
lines=lines,
|
||||||
lineids=line_ids,
|
lineids=line_ids,
|
||||||
stations=new_stations,
|
stations=stations,
|
||||||
fromstation=station_from,
|
fromstation=station_from,
|
||||||
tostation=station_to,
|
tostation=station_to,
|
||||||
bothways=both_ways,
|
bothways=both_ways,
|
||||||
|
Loading…
Reference in New Issue
Block a user