Spaces:
Sleeping
Sleeping
Update tools.py
Browse files
tools.py
CHANGED
@@ -169,7 +169,7 @@ class check_room_availability(ToolBase):
|
|
169 |
check_in_date = instance.check_in_date
|
170 |
check_in_date = instance.check_in_date
|
171 |
guests = instance.guests
|
172 |
-
rooms = [room for room in json_data["
|
173 |
if len(rooms) == 0:
|
174 |
return f"There is no room exists with room type {room_type}"
|
175 |
|
@@ -202,7 +202,7 @@ class make_reservation(ToolBase):
|
|
202 |
user_id = instance.user_id
|
203 |
|
204 |
|
205 |
-
rooms = [room for room in json_data["
|
206 |
if len(rooms) == 0:
|
207 |
return f"There is no room exists with room type {room_type}"
|
208 |
|
|
|
169 |
check_in_date = instance.check_in_date
|
170 |
check_in_date = instance.check_in_date
|
171 |
guests = instance.guests
|
172 |
+
rooms = [room for room in json_data["accomodations"] if room_type in room["type"]]
|
173 |
if len(rooms) == 0:
|
174 |
return f"There is no room exists with room type {room_type}"
|
175 |
|
|
|
202 |
user_id = instance.user_id
|
203 |
|
204 |
|
205 |
+
rooms = [room for room in json_data["accomodations"] if room_type in room["type"]]
|
206 |
if len(rooms) == 0:
|
207 |
return f"There is no room exists with room type {room_type}"
|
208 |
|