[FIX]pms: get_room_type_capacity filtered lambda

This commit is contained in:
Darío Lodeiros
2023-04-19 18:38:36 +02:00
parent 261ce4dae3
commit 99c94828c5

View File

@@ -209,6 +209,6 @@ class PmsRoomType(models.Model):
def get_room_type_capacity(self, pms_property_id):
self.ensure_one()
capacities = self.room_ids.filtered(
lambda r: r.pms_property_id.id == pms_property_id
lambda r: r.pms_property_id.id == pms_property_id.id
).mapped("capacity")
return min(capacities) if any(capacities) else 0