From edb541f3dc3dca9f03fc75b1e7e399fcf9d6790f Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Wed, 24 Jan 2024 14:36:46 +0000 Subject: [PATCH] patching heating controls --- backend/Property.py | 1 + etl/eligibility/ha_15_32/ha_analysis_batch_3.py | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/backend/Property.py b/backend/Property.py index e527c1ea..4d26857d 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -319,6 +319,7 @@ class Property(Definitions): attributes = [ x for x in cleaned[description] if x["original_description"] == self.data[description] ] + if len(attributes) > 1: raise ValueError("Either No attributes or multiple found for %s" % description) diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 85486e17..66183599 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -786,6 +786,16 @@ def app(): ] ) + # Patch mainheatcont-description + cleaned["mainheatcont-description"].extend( + [ + {'original_description': 'None', 'clean_description': 'None', 'thermostatic_control': False, + 'charging_system': False, 'switch_system': False, 'no_control': False, 'dhw_control': False, + 'community_heating': False, 'multiple_room_thermostats': False, 'auxiliary_systems': False, 'trvs': False, + 'rate_control': False} + ] + ) + # We patch this record because there is another property below for x in cleaned["floor-description"]: if x["original_description"] == '(Same dwelling below) insulated (assumed)':