[FIX] pms-api-rest: remove unnecessary query from subquery for free rooms

This commit is contained in:
miguelpadin
2023-07-26 17:52:31 +02:00
committed by Darío Lodeiros
parent c27e9700d9
commit b603122e39

View File

@@ -429,11 +429,6 @@ class PmsCalendarService(Component):
AND occupies_availability = true
AND room_id = r.id
AND r.is_shared_room = false)
AND EXISTS (SELECT 1
FROM pms_room
WHERE active = true
AND room_type_id = dr.room_type_id
AND pms_property_id = %s)
) free_rooms
FROM
(
@@ -472,7 +467,6 @@ class PmsCalendarService(Component):
ORDER BY dr.room_type_id, dr.date;
""",
(
calendar_search_param.pmsPropertyId,
calendar_search_param.pmsPropertyId,
calendar_search_param.pmsPropertyId,
date_from,