Spaces:
Sleeping
Sleeping
OnlyBiggg commited on
Commit ·
f0224f6
1
Parent(s): 8acc319
fix trip
Browse files
app/dialogflow/services/dialog_service.py
CHANGED
|
@@ -132,7 +132,7 @@ class DialogService:
|
|
| 132 |
|
| 133 |
# Danh sách chuyến đi có thể chọn được theo văn phòng
|
| 134 |
@staticmethod
|
| 135 |
-
def get_all_trip_by_office(trips, origin_id: int = None, dest_id: int = None) -> list:
|
| 136 |
if origin_id is None and dest_id is None:
|
| 137 |
return trips
|
| 138 |
|
|
@@ -160,7 +160,7 @@ class DialogService:
|
|
| 160 |
start = max(0, index - 2)
|
| 161 |
end = min(len(time_trips), index + 2)
|
| 162 |
|
| 163 |
-
return
|
| 164 |
|
| 165 |
|
| 166 |
|
|
|
|
| 132 |
|
| 133 |
# Danh sách chuyến đi có thể chọn được theo văn phòng
|
| 134 |
@staticmethod
|
| 135 |
+
def get_all_trip_by_office(trips: list, origin_id: int = None, dest_id: int = None) -> list:
|
| 136 |
if origin_id is None and dest_id is None:
|
| 137 |
return trips
|
| 138 |
|
|
|
|
| 160 |
start = max(0, index - 2)
|
| 161 |
end = min(len(time_trips), index + 2)
|
| 162 |
|
| 163 |
+
return trips[start:end]
|
| 164 |
|
| 165 |
|
| 166 |
|