Fixed the case when stations is None

This commit is contained in:
Profitroll 2022-10-07 13:51:37 +02:00
parent 76774fc9cb
commit 94472ba945
1 changed files with 9 additions and 7 deletions

View File

@ -198,12 +198,14 @@ class Client():
if isinstance(station_to, Stop):
station_to = station_to.ext_id
new_stations = []
for stop in stations:
if isinstance(stop, Stop):
new_stations.append(stop.ext_id)
else:
new_stations.append(stop)
if stations != None:
new_stations = []
for stop in stations:
if isinstance(stop, Stop):
new_stations.append(stop.ext_id)
else:
new_stations.append(stop)
stations = new_stations
if search_mode == None:
search_mode = None
@ -235,7 +237,7 @@ class Client():
companies=companies,
lines=lines,
lineids=line_ids,
stations=new_stations,
stations=stations,
fromstation=station_from,
tostation=station_to,
bothways=both_ways,