mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
switching off rebaselining temp
This commit is contained in:
parent
025b18a29c
commit
67df3a810a
2 changed files with 18 additions and 2 deletions
|
|
@ -652,7 +652,8 @@ async def model_engine(body: PlanTriggerRequest):
|
|||
epc_records["original_epc"]["estimated"] = False
|
||||
|
||||
prepared_epc = EPCRecord(
|
||||
epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data, address_metadata=addr
|
||||
epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data,
|
||||
# address_metadata=addr Switched off to remove injecting landlord inputs
|
||||
)
|
||||
|
||||
input_properties.append(
|
||||
|
|
|
|||
|
|
@ -580,7 +580,22 @@ class EPCRecord:
|
|||
if existing is not None and v is not None and abs(existing - v) > 1: # 1m tolerance
|
||||
self.landlord_differences[k] = v
|
||||
else:
|
||||
if v != self._prepared_epc.get(k) and (not pd.isnull(v)) and (not pd.isnull(self._prepared_epc.get(k))):
|
||||
|
||||
# Check if something has been cleaned. We want to avoid triggering re-baselining if we cleaned
|
||||
# a value. In the address meta, it will possibly contain the original value, so we'd pick up a
|
||||
# diference if the original value was something to be cleaned, we clean that value and then end up
|
||||
# comparing the original value to the new clean one
|
||||
cleaned_value = self._prepared_epc.get(k)
|
||||
original_value = self.original_epc.get(k.replace("_", "-"))
|
||||
|
||||
# We check if the value has been cleaned
|
||||
if cleaned_value != original_value:
|
||||
# The thing we want to compare against, is the original value
|
||||
compare_to = original_value
|
||||
else:
|
||||
compare_to = cleaned_value
|
||||
|
||||
if v != compare_to and (not pd.isnull(v)) and (not pd.isnull(self._prepared_epc.get(k))):
|
||||
self.landlord_differences[k] = v
|
||||
|
||||
self._prepared_epc.update(self.landlord_differences)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue