mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
debugging fuel types and a zero floor area property
This commit is contained in:
parent
c1a262830c
commit
1e9aa98ffc
2 changed files with 12 additions and 1 deletions
|
|
@ -1212,9 +1212,17 @@ class Property:
|
|||
else:
|
||||
self.heating_energy_source = ['Wood Logs']
|
||||
|
||||
if len(self.heating_energy_source) == 0 or len(self.heating_energy_source) > 1:
|
||||
if len(self.heating_energy_source) == 0 or (
|
||||
len(self.heating_energy_source) > 1 and "Varied (Community Scheme)" not in self.heating_energy_source
|
||||
):
|
||||
# We might have something like heating energy source equal to ['Natural Gas', 'Varied (Community Scheme)']
|
||||
# so we treat this as community heating
|
||||
raise Exception("Investigate me")
|
||||
|
||||
if len(self.heating_energy_source) > 1:
|
||||
# We treat this as a community scheme
|
||||
self.heating_energy_source = ["Varied (Community Scheme)"]
|
||||
|
||||
self.heating_energy_source = self.heating_energy_source[0]
|
||||
|
||||
if self.heating_energy_source == "Varied (Community Scheme)":
|
||||
|
|
|
|||
|
|
@ -596,6 +596,9 @@ class EPCRecord:
|
|||
if not self.prepared_epc:
|
||||
raise ValueError("EPC Recrod doesn not contain epc data")
|
||||
|
||||
if self.prepared_epc["total-floor-area"] is None:
|
||||
return
|
||||
|
||||
self.prepared_epc["total-floor-area"] = float(
|
||||
self.prepared_epc["total-floor-area"]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue