OnlyBiggg commited on
Commit
e443ec3
·
1 Parent(s): ca0c5f7
Files changed (1) hide show
  1. app/api/routes.py +1 -1
app/api/routes.py CHANGED
@@ -221,7 +221,7 @@ async def booking_trip(request: Request) -> Response:
221
  schedule_time_trip = "**" + "** | **".join(map(str, list_raw_departure_times)) + "**"
222
  routes_name = []
223
  for trip in data:
224
- if trip["route"] not in routes_name:
225
  routes_name.append(trip["route"]["name"])
226
  text = [" | ".join(map(str, routes_name))]
227
  return DialogFlowResponseAPI(text=text)
 
221
  schedule_time_trip = "**" + "** | **".join(map(str, list_raw_departure_times)) + "**"
222
  routes_name = []
223
  for trip in data:
224
+ if trip["route"] and trip["route"]["name"] not in routes_name:
225
  routes_name.append(trip["route"]["name"])
226
  text = [" | ".join(map(str, routes_name))]
227
  return DialogFlowResponseAPI(text=text)