From fd7f96152e123387c935327d2abaac3e8d8bb44b Mon Sep 17 00:00:00 2001 From: zainab2097 <149927291+zainab2097@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:19:56 +0300 Subject: [PATCH] Update rental_contract.py --- odex25_realstate/property_management/models/rental_contract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odex25_realstate/property_management/models/rental_contract.py b/odex25_realstate/property_management/models/rental_contract.py index c7a47346b..bad15c483 100644 --- a/odex25_realstate/property_management/models/rental_contract.py +++ b/odex25_realstate/property_management/models/rental_contract.py @@ -363,7 +363,7 @@ class RentalContract(models.Model): def action_review(self): full = True - if self.property_id.state in ['reserve', 'rent']: + if self.property_id.state in ['reserve', 'rent'] and self.property_id.contract_counts>1: raise exceptions.ValidationError(_("Property is already reserved or rented")) # for units in self.property_id.unit_ids: