From 2ac82bbbb10591009d449d085197fde1e0d88261 Mon Sep 17 00:00:00 2001 From: miguelpadin Date: Mon, 10 Oct 2022 17:31:58 +0200 Subject: [PATCH] [IMP] pms-api-rest: assign reservation room --- pms_api_rest/services/pms_reservation_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pms_api_rest/services/pms_reservation_service.py b/pms_api_rest/services/pms_reservation_service.py index 7aa7f3764..d831987ce 100644 --- a/pms_api_rest/services/pms_reservation_service.py +++ b/pms_api_rest/services/pms_reservation_service.py @@ -188,6 +188,9 @@ class PmsReservationService(Component): reservation_vals.update( {"segmentation_ids": [(6, 0, [reservation_data.segmentationId])]} ) + if reservation_data.toAssign is not None and not reservation_data.toAssign: + reservation.action_assign() + reservation.write(reservation_vals) def _get_reservation_lines_mapped(self, origin_data, reservation_line=False):