From 6cdb2acd8982c97b28267cbfb3101d3dbfb7bff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Wed, 15 Jun 2022 16:59:17 +0200 Subject: [PATCH] [IMP] pms_api_rest: add room extra beds allowed --- pms_api_rest/datamodels/pms_room.py | 1 + pms_api_rest/services/pms_room_service.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pms_api_rest/datamodels/pms_room.py b/pms_api_rest/datamodels/pms_room.py index 987af4c58..6413634d3 100644 --- a/pms_api_rest/datamodels/pms_room.py +++ b/pms_api_rest/datamodels/pms_room.py @@ -19,3 +19,4 @@ class PmsRoomInfo(Datamodel): shortName = fields.String(required=False, allow_none=True) roomTypeClassId = fields.Integer(required=False, allow_none=True) ubicationId = fields.Integer(required=False, allow_none=True) + extraBedsAllowed = fields.Integer(required=False, allow_none=True) diff --git a/pms_api_rest/services/pms_room_service.py b/pms_api_rest/services/pms_room_service.py index 9b0d5d210..c1dadb5b7 100644 --- a/pms_api_rest/services/pms_room_service.py +++ b/pms_api_rest/services/pms_room_service.py @@ -53,6 +53,7 @@ class PmsRoomService(Component): shortName=room.short_name, roomTypeClassId=room.room_type_id.class_id, ubicationId=room.ubication_id, + extraBedsAllowed=room.extra_beds_allowed, ) ) return result_rooms @@ -79,6 +80,7 @@ class PmsRoomService(Component): roomTypeId=room.room_type_id, capacity=room.capacity, shortName=room.short_name, + extraBedsAllowed=room.extra_beds_allowed, ) else: raise MissingError(_("Room not found"))