mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
if null, remove from landlord remapping
This commit is contained in:
parent
f64344c3c3
commit
f8ed406e89
1 changed files with 2 additions and 0 deletions
|
|
@ -566,6 +566,7 @@ class EPCRecord:
|
|||
"multi_glaze_proportion": addr.landlord_multi_glaze_proportion,
|
||||
"construction_age_band": addr.landlord_construction_age_band,
|
||||
}
|
||||
landlord_remapping = {k: v for k, v in landlord_remapping.items() if v is not None}
|
||||
|
||||
# Sanity check - ensure valid keys
|
||||
if any(k not in self._prepared_epc for k in landlord_remapping):
|
||||
|
|
@ -573,6 +574,7 @@ class EPCRecord:
|
|||
|
||||
self.landlord_differences = {} # Anything actaully changed
|
||||
for k, v in landlord_remapping.items():
|
||||
|
||||
if k == "total_floor_area":
|
||||
existing = self._prepared_epc.get(k)
|
||||
if existing is not None and v is not None and abs(existing - v) > 1: # 1m tolerance
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue