ankush13r commited on
Commit
0571097
·
verified ·
1 Parent(s): a9e7805

Update tools.py

Browse files
Files changed (1) hide show
  1. tools.py +3 -3
tools.py CHANGED
@@ -189,7 +189,7 @@ class check_room_availability(ToolBase):
189
  if len(rooms) == 0:
190
  return f"There is no room exists with room type {room_type}"
191
 
192
- rooms2 = [room for room in rooms if guests >= room["number_of_guests"]]
193
  if len(rooms2) == 0:
194
  max_guests = json_data["room_types"][room_type]["number_of_guests"]
195
  return f"The number of guest is superior then the availibilty, maximum is {max_guests}"
@@ -246,7 +246,7 @@ class make_reservation(ToolBase):
246
  if len(rooms) == 0:
247
  return f"There is no room exists with room type {room_type}"
248
 
249
- rooms2 = [room for room in rooms if guests >= room["number_of_guests"]]
250
  if len(rooms2) == 0:
251
  max_guests = json_data["room_types"][room_type]["number_of_guests"]
252
  return f"The number of guest is superior then the availibilty, maximum is {max_guests}"
@@ -363,7 +363,7 @@ class modify_reservation(ToolBase):
363
  if len(rooms) == 0:
364
  return f"There is no room exists with room type {new_room_type}"
365
 
366
- rooms = [room for room in rooms if guests >= room["number_of_guests"]]
367
  if len(rooms) == 0:
368
  max_guests = json_data["room_types"][new_room_type]["number_of_guests"]
369
  return f"The number of guest is superior then the availibilty, maximum is {max_guests}"
 
189
  if len(rooms) == 0:
190
  return f"There is no room exists with room type {room_type}"
191
 
192
+ rooms2 = [room for room in rooms if guests <= room["number_of_guests"]]
193
  if len(rooms2) == 0:
194
  max_guests = json_data["room_types"][room_type]["number_of_guests"]
195
  return f"The number of guest is superior then the availibilty, maximum is {max_guests}"
 
246
  if len(rooms) == 0:
247
  return f"There is no room exists with room type {room_type}"
248
 
249
+ rooms2 = [room for room in rooms if guests <= room["number_of_guests"]]
250
  if len(rooms2) == 0:
251
  max_guests = json_data["room_types"][room_type]["number_of_guests"]
252
  return f"The number of guest is superior then the availibilty, maximum is {max_guests}"
 
363
  if len(rooms) == 0:
364
  return f"There is no room exists with room type {new_room_type}"
365
 
366
+ rooms = [room for room in rooms if guests <= room["number_of_guests"]]
367
  if len(rooms) == 0:
368
  max_guests = json_data["room_types"][new_room_type]["number_of_guests"]
369
  return f"The number of guest is superior then the availibilty, maximum is {max_guests}"