From da819ad9d0fba9731628a04367ef3748508e50fd Mon Sep 17 00:00:00 2001 From: Connor Brackley Date: Wed, 27 Nov 2024 22:56:39 +0000 Subject: [PATCH] Minor bug fixes --- hub/city_model_structure/building_demand/thermal_zone.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hub/city_model_structure/building_demand/thermal_zone.py b/hub/city_model_structure/building_demand/thermal_zone.py index f4262aec..02924ea9 100644 --- a/hub/city_model_structure/building_demand/thermal_zone.py +++ b/hub/city_model_structure/building_demand/thermal_zone.py @@ -62,6 +62,10 @@ class ThermalZone: self._domestic_hot_water = None self._usage_name = None self._usages = usages + self._usage_from_parent = False + if usages is None: + self._usage_from_parent = True + @property def parent_internal_zone(self) -> InternalZone: @@ -74,11 +78,10 @@ class ThermalZone: @property def usages(self): """ - Get the thermal zone usages including percentage with the format [percentage]-usage_[percentage]-usage... - Eg: 70-office_30-residential + Get the thermal zone usages :return: str """ - if self._usages is not None: + if self._usage_from_parent: self._usages = copy.deepcopy(self._parent_internal_zone.usages) return self._usages