notif_report #3

Merged
jonas merged 18 commits from notif_report into main 2025-10-06 12:50:41 +00:00
Showing only changes of commit b7afe4f528 - Show all commits

View File

@@ -741,9 +741,18 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]):
room_stays = OtaResRetrieveRs.ReservationsList.HotelReservation.RoomStays(
room_stay=[room_stay],
)
klick_id = reservation.fbclid or reservation.gclid
if klick_id in (None, "", "None"):
klick_id = None
else: # extract string from Column object
klick_id = str(klick_id)
hotel_res_id_data = HotelReservationIdData(
res_id_type="13",
res_id_value=reservation.fbclid or reservation.gclid,
res_id_value=klick_id,
res_id_source=None,
res_id_source_context="99tales",
)
@@ -754,9 +763,19 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]):
hotel_res_ids = OtaResRetrieveRs.ReservationsList.HotelReservation.ResGlobalInfo.HotelReservationIds(
hotel_reservation_id=[hotel_res_id]
)
if reservation.hotel_code is None:
raise ValueError("Reservation hotel_code is None")
else:
hotel_code = str(reservation.hotel_code)
if reservation.hotel_name is None:
hotel_name = None
else:
hotel_name = str(reservation.hotel_name)
basic_property_info = OtaResRetrieveRs.ReservationsList.HotelReservation.ResGlobalInfo.BasicPropertyInfo(
hotel_code=reservation.hotel_code,
hotel_name=reservation.hotel_name,
hotel_code=hotel_code,
hotel_name=hotel_name,
)
# Comments