OnlyBiggg commited on
Commit
8acc319
·
1 Parent(s): 70eea09
app/dialogflow/api/v1/dialogflow.py CHANGED
@@ -495,18 +495,16 @@ async def is_valid_select_trip(request: Request) -> Response:
495
 
496
  if raw_input:
497
  raw_input = raw_input.strip()
498
- if raw_input in trip_select:
499
  for item in trips:
500
  if item["route"] == raw_input:
501
  trip = item
502
- break
503
-
504
- parameters = {
505
- "is_valid_trip": True,
506
- "trip": trip
507
- }
508
- else:
509
- parameters = {
510
  "is_valid_trip": False,
511
  }
512
  return DialogFlowResponseAPI(parameters=parameters)
 
495
 
496
  if raw_input:
497
  raw_input = raw_input.strip()
 
498
  for item in trips:
499
  if item["route"] == raw_input:
500
  trip = item
501
+ parameters = {
502
+ "is_valid_trip": True,
503
+ "trip": trip
504
+ }
505
+ return DialogFlowResponseAPI(parameters=parameters)
506
+
507
+ parameters = {
 
508
  "is_valid_trip": False,
509
  }
510
  return DialogFlowResponseAPI(parameters=parameters)