Skip to content

Commit

Permalink
[FIX]pms_api_rest: api set internal_comment in folio fix (if internal…
Browse files Browse the repository at this point in the history
…_comment record is False)
  • Loading branch information
DarioLodeiros committed Oct 10, 2024
1 parent 9a557d5 commit 9ab22f4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions pms_api_rest/services/pms_folio_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -1940,17 +1940,17 @@ def update_folio_values(self, folio, pms_folio_info):
# ):
# for reservation in folio.reservation_ids:
# reservation.action_confirm()
if (
pms_folio_info.internalComment is not None
and pms_folio_info.internalComment not in folio.internal_comment
):
folio_vals.update(
{
"internal_comment": folio.internal_comment
+ " "
+ pms_folio_info.internalComment
}
)
if pms_folio_info.internalComment is not None:
if not folio.internal_comment:
folio_vals.update({"internal_comment": pms_folio_info.internalComment})
elif pms_folio_info.internalComment not in folio.internal_comment:
folio_vals.update(
{
"internal_comment": folio.internal_comment
+ " "
+ pms_folio_info.internalComment
}
)
if pms_folio_info.partnerId and folio.partner_id.id != pms_folio_info.partnerId:
folio_vals.update({"partner_id": pms_folio_info.partnerId})
elif not pms_folio_info.partnerId:
Expand Down

0 comments on commit 9ab22f4

Please sign in to comment.