Shorten unique id
This commit is contained in:
@@ -701,9 +701,16 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]):
|
||||
reservation.num_adults, children_ages
|
||||
)
|
||||
|
||||
|
||||
unique_id_string = reservation.form_id
|
||||
|
||||
|
||||
if len(unique_id_string) > 32:
|
||||
unique_id_string = unique_id_string[:32] # Truncate to 32 characters
|
||||
|
||||
# UniqueID
|
||||
unique_id = OtaResRetrieveRs.ReservationsList.HotelReservation.UniqueId(
|
||||
type_value=UniqueIdType2.VALUE_14, id=reservation.form_id
|
||||
type_value=UniqueIdType2.VALUE_14, id=unique_id_string
|
||||
)
|
||||
|
||||
# TimeSpan
|
||||
@@ -780,6 +787,8 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]):
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
hotel_reservation = OtaResRetrieveRs.ReservationsList.HotelReservation(
|
||||
create_date_time=datetime.now(timezone.utc).isoformat(),
|
||||
res_status=HotelReservationResStatus.REQUESTED,
|
||||
|
||||
Reference in New Issue
Block a user