mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
handling retrieveing find my epc when we're passing a flat
This commit is contained in:
parent
ca173c88ca
commit
7b0fd45fe2
1 changed files with 11 additions and 3 deletions
|
|
@ -509,10 +509,18 @@ async def model_engine(body: PlanTriggerRequest):
|
||||||
# if we have a remote assment data type, we pull the additional data and include it
|
# if we have a remote assment data type, we pull the additional data and include it
|
||||||
if body.event_type == "remote_assessment":
|
if body.event_type == "remote_assessment":
|
||||||
logger.info("Retrieving find my epc data")
|
logger.info("Retrieving find my epc data")
|
||||||
for k in ["address", "address1"]:
|
try:
|
||||||
epc_searcher.newest_epc[k] = epc_searcher.address_clean
|
property_non_invasive_recommendations, patch = RetrieveFindMyEpc.get_from_epc(
|
||||||
|
epc_searcher.newest_epc
|
||||||
|
)
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Failed to retrieve without cleaning address {e}")
|
||||||
|
for k in ["address", "address1"]:
|
||||||
|
epc_searcher.newest_epc[k] = epc_searcher.address_clean
|
||||||
|
property_non_invasive_recommendations, patch = RetrieveFindMyEpc.get_from_epc(
|
||||||
|
epc_searcher.newest_epc
|
||||||
|
)
|
||||||
|
|
||||||
property_non_invasive_recommendations, patch = RetrieveFindMyEpc.get_from_epc(epc_searcher.newest_epc)
|
|
||||||
# If we have a property type, this means when we pull the epc data, we might need to make a patch
|
# If we have a property type, this means when we pull the epc data, we might need to make a patch
|
||||||
|
|
||||||
epc_records = patch_epc(patch, epc_records)
|
epc_records = patch_epc(patch, epc_records)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue