From 9ae708e94f2da8ddb7019ad0eaae1a23bb8f6bcf Mon Sep 17 00:00:00 2001 From: Pablo Date: Mon, 18 Mar 2019 13:25:14 +0100 Subject: [PATCH] [FIX] unfix... occupancy includes children... --- .../models/hotel_reservation/importer.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py index 08ec42730..002742396 100644 --- a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py +++ b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py @@ -101,9 +101,10 @@ class HotelReservationImporter(Component): tax_inclusive = True persons = room_type_bind.ota_capacity # 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) - if occupancy: - persons = occupancy['occupancy'] + # BUG: occupancy includes children... Review adults by OTA + # occupancy = next((item for item in book['rooms_occupancies'] if item["id"] == broom['room_id']), False) + # if occupancy: + # persons = occupancy['occupancy'] # Dates real_checkin_str = real_checkin.strftime( DEFAULT_SERVER_DATETIME_FORMAT)