diff --git a/backend/Property.py b/backend/Property.py index f8013fb5..b9830b93 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -1296,6 +1296,13 @@ class Property: else: raise NotImplementedError(f"Unhandled fuel {self.main_fuel['fuel_type']}") + # We handle edge case where no heating system is indicated + if self.main_fuel["fuel_type"] in fuel_map: + mapped_fuel = fuel_map[self.main_fuel["fuel_type"]] + self.heating_energy_source = mapped_fuel + self.hot_water_energy_source = mapped_fuel + return + if len(self.heating_energy_source) > 1: # We treat this as a community scheme self.heating_energy_source = ["Varied (Community Scheme)"] diff --git a/backend/engine/engine.py b/backend/engine/engine.py index cf147fcd..9b22feee 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -899,7 +899,7 @@ async def model_engine(body: PlanTriggerRequest): # Insert the spatial data logger.info("Getting spatial data") input_properties = OpenUprnClient.set_spatial_data(input_properties, bucket_name=get_settings().DATA_BUCKET) - + [p.set_features(cleaned=cleaned, kwh_client=kwh_client, kwh_predictions=kwh_preds) for p in input_properties] logger.info("Performing solar analysis")