From 6d85468615b87b3343c3a36f6757dcd8e059194d Mon Sep 17 00:00:00 2001 From: Pablo Date: Tue, 12 Mar 2019 11:42:43 +0100 Subject: [PATCH] [FIX] use `men` for number of adults before search for `guest` key --- .../models/hotel_reservation/importer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py index b5237880c..7648286f1 100644 --- a/hotel_channel_connector_wubook/models/hotel_reservation/importer.py +++ b/hotel_channel_connector_wubook/models/hotel_reservation/importer.py @@ -99,7 +99,8 @@ class HotelReservationImporter(Component): split_booking, dates_checkin, dates_checkout, real_checkin, real_checkout, book): is_cancellation = book['status'] in WUBOOK_STATUS_BAD tax_inclusive = True - persons = room_type_bind.ota_capacity + # men = Number of adults (when not defined, equal to -1) + persons = book.get('men', -1) > -1 and book.get('men') or room_type_bind.ota_capacity # Dates real_checkin_str = real_checkin.strftime( DEFAULT_SERVER_DATETIME_FORMAT)