Skip to content

Commit

Permalink
[TMP]civitfun: avoid headers conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
DarioLodeiros committed Jul 11, 2023
1 parent d0e54ad commit e84e6b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pms_civitfun/services/pms_checkin_partner_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class PmsReservationService(Component):
],
input_param=Datamodel("civitfun.guest.meta", is_list=False),
output_param=Datamodel("civitfun.guest.meta.result", is_list=False),
auth="jwt_civitfun",
auth="public",
)
def register_hosts(self, pms_input_param):
try:
Expand Down
9 changes: 5 additions & 4 deletions pms_civitfun/services/pms_reservation_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class CivitfunReservationService(Component):
],
input_param=Datamodel("civitfun.reservation.search.info", is_list=False),
output_param=Datamodel("civitfun.booking.results", is_list=False),
auth="jwt_civitfun",
auth="public",
)
def get_reservations(self, pms_search_param):
try:
Expand Down Expand Up @@ -127,11 +127,11 @@ def _mapped_reservation_info(self, reservation):
holderCountry=reservation.partner_id.country_id.code_alpha3
if reservation.partner_id.country_id
else None,
email=reservation.email,
email=reservation.email or None,
entrance=reservation.checkin.strftime(FORMAT_DATE),
entranceTime=reservation.arrival_hour,
entranceTime=reservation.arrival_hour or None,
departure=reservation.checkout.strftime(FORMAT_DATE),
departureTime=reservation.departure_hour,
departureTime=reservation.departure_hour or None,
adults=reservation.adults,
babies=0,
children=reservation.children,
Expand Down Expand Up @@ -173,6 +173,7 @@ def _mapped_guests(self, reservation):
position=reservation.checkin_partner_ids.ids.index(checkin.id) + 1,
email=checkin.email or None,
lang=checkin.partner_id.lang or None,
language=checkin.partner_id.lang or None,
name=checkin.firstname or None,
surname=checkin.lastname or None,
secondSurname=checkin.lastname2 or None,
Expand Down

0 comments on commit e84e6b9

Please sign in to comment.