[FIX] unfix... occupancy includes children...

This commit is contained in:
Pablo
2019-03-18 13:25:14 +01:00
parent f2ca889222
commit 9ae708e94f

View File

@@ -101,9 +101,10 @@ class HotelReservationImporter(Component):
tax_inclusive = True tax_inclusive = True
persons = room_type_bind.ota_capacity persons = room_type_bind.ota_capacity
# Info about the occupancy of each booked room (it can be empty) # Info about the occupancy of each booked room (it can be empty)
occupancy = next((item for item in book['rooms_occupancies'] if item["id"] == broom['room_id']), False) # BUG: occupancy includes children... Review adults by OTA
if occupancy: # occupancy = next((item for item in book['rooms_occupancies'] if item["id"] == broom['room_id']), False)
persons = occupancy['occupancy'] # if occupancy:
# persons = occupancy['occupancy']
# Dates # Dates
real_checkin_str = real_checkin.strftime( real_checkin_str = real_checkin.strftime(
DEFAULT_SERVER_DATETIME_FORMAT) DEFAULT_SERVER_DATETIME_FORMAT)