From f88871aa993374cfd9121b25fb68b1bbf961c007 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Thu, 1 Dec 2022 14:55:39 +0100 Subject: [PATCH] [FIX]pms_api_rest: dont link services with boardServiceId param None --- pms_api_rest/services/pms_reservation_service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pms_api_rest/services/pms_reservation_service.py b/pms_api_rest/services/pms_reservation_service.py index 282933f99..fbce7bdcd 100644 --- a/pms_api_rest/services/pms_reservation_service.py +++ b/pms_api_rest/services/pms_reservation_service.py @@ -207,7 +207,10 @@ class PmsReservationService(Component): reservation_vals, reservation_data ) # TODO: this should be @ pms core - if reservation_data.boardServiceId != reservation.board_service_room_id: + if ( + reservation_data.boardServiceId is not None + and reservation_data.boardServiceId != reservation.board_service_room_id + ): reservation.service_ids.filtered(lambda x: x.is_board_service).unlink() if reservation_vals: reservation.write(reservation_vals)