Fixed missing offer comment causing validation error
This commit is contained in:
@@ -745,6 +745,9 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]):
|
||||
hotel_name=reservation.hotel_name,
|
||||
)
|
||||
# Comments
|
||||
|
||||
offer_comment = None
|
||||
if reservation.offer is not None:
|
||||
offer_comment = CommentData(
|
||||
name=CommentName2.ADDITIONAL_INFO,
|
||||
text="Angebot/Offerta",
|
||||
@@ -776,6 +779,10 @@ def create_xml_from_db(list: list[Tuple[Reservation, Customer]]):
|
||||
|
||||
comments_xml = None
|
||||
if comments:
|
||||
|
||||
for c in comments:
|
||||
_LOGGER.info(f"Creating comment: name={c.name}, text={c.text}, list_items={len(c.list_items)}")
|
||||
|
||||
comments_data = CommentsData(comments=comments)
|
||||
comments_xml = alpine_bits_factory.create(comments_data, OtaMessageType.RETRIEVE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user