Spaces:
Sleeping
Sleeping
OnlyBiggg
commited on
Commit
·
adabd1b
1
Parent(s):
13a6e1e
fix time
Browse files
app/dialogflow/api/v1/dialogflow.py
CHANGED
|
@@ -440,15 +440,15 @@ async def is_valid_select_time(request: Request) -> Response:
|
|
| 440 |
|
| 441 |
origin_code, origin_id, origin_ids, dest_code, dest_id, dest_ids = None, None, None, None, None, None
|
| 442 |
if origin_office:
|
| 443 |
-
|
| 444 |
origin_ids = await dialog_service.find_id_office_by_name_office(origin_office)
|
| 445 |
elif raw_departure_city:
|
| 446 |
-
origin_code =
|
| 447 |
if dest_office:
|
| 448 |
-
|
| 449 |
dest_ids = await dialog_service.find_id_office_by_name_office(dest_office)
|
| 450 |
elif raw_destination_city:
|
| 451 |
-
dest_code =
|
| 452 |
route_ids = await dialog_service.search_all_route_ids(origin_code=origin_code, from_id=origin_id, orign_ids=origin_ids, dest_code=dest_code, to_id=dest_id, dest_ids=dest_ids)
|
| 453 |
|
| 454 |
|
|
|
|
| 440 |
|
| 441 |
origin_code, origin_id, origin_ids, dest_code, dest_id, dest_ids = None, None, None, None, None, None
|
| 442 |
if origin_office:
|
| 443 |
+
origin_id, origin_code = await dialog_service.find_id_and_code_provine_by_name_office(origin_office)
|
| 444 |
origin_ids = await dialog_service.find_id_office_by_name_office(origin_office)
|
| 445 |
elif raw_departure_city:
|
| 446 |
+
origin_id, origin_code = get_origin_id_and_code(raw_departure_city)
|
| 447 |
if dest_office:
|
| 448 |
+
dest_id, dest_code = await dialog_service.find_id_and_code_provine_by_name_office(dest_office)
|
| 449 |
dest_ids = await dialog_service.find_id_office_by_name_office(dest_office)
|
| 450 |
elif raw_destination_city:
|
| 451 |
+
dest_id, dest_code = get_origin_id_and_code(raw_destination_city)
|
| 452 |
route_ids = await dialog_service.search_all_route_ids(origin_code=origin_code, from_id=origin_id, orign_ids=origin_ids, dest_code=dest_code, to_id=dest_id, dest_ids=dest_ids)
|
| 453 |
|
| 454 |
|