[IMP] pms_api_rest: add room extra beds allowed

This commit is contained in:
Darío Lodeiros
2022-06-15 16:59:17 +02:00
parent c439a947b2
commit 6cdb2acd89
2 changed files with 3 additions and 0 deletions

View File

@@ -19,3 +19,4 @@ class PmsRoomInfo(Datamodel):
shortName = fields.String(required=False, allow_none=True) shortName = fields.String(required=False, allow_none=True)
roomTypeClassId = fields.Integer(required=False, allow_none=True) roomTypeClassId = fields.Integer(required=False, allow_none=True)
ubicationId = fields.Integer(required=False, allow_none=True) ubicationId = fields.Integer(required=False, allow_none=True)
extraBedsAllowed = fields.Integer(required=False, allow_none=True)

View File

@@ -53,6 +53,7 @@ class PmsRoomService(Component):
shortName=room.short_name, shortName=room.short_name,
roomTypeClassId=room.room_type_id.class_id, roomTypeClassId=room.room_type_id.class_id,
ubicationId=room.ubication_id, ubicationId=room.ubication_id,
extraBedsAllowed=room.extra_beds_allowed,
) )
) )
return result_rooms return result_rooms
@@ -79,6 +80,7 @@ class PmsRoomService(Component):
roomTypeId=room.room_type_id, roomTypeId=room.room_type_id,
capacity=room.capacity, capacity=room.capacity,
shortName=room.short_name, shortName=room.short_name,
extraBedsAllowed=room.extra_beds_allowed,
) )
else: else:
raise MissingError(_("Room not found")) raise MissingError(_("Room not found"))