mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
fixing bug with missing fuel type
This commit is contained in:
parent
9c48bdfbd6
commit
5ed7836fde
2 changed files with 8 additions and 1 deletions
|
|
@ -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)"]
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue