mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
allowing uprn to be optional
This commit is contained in:
parent
edf9c00759
commit
020ac42c5f
1 changed files with 7 additions and 3 deletions
|
|
@ -45,7 +45,9 @@ class AssetListEpcData:
|
|||
|
||||
self.non_invasive_recommendations = [
|
||||
{
|
||||
"uprn": r["uprn"],
|
||||
"uprn": r.get("uprn"),
|
||||
"address": r["address"],
|
||||
"postcode": r["postcode"],
|
||||
"recommendations": r["recommendations"]
|
||||
} for r in self.extracted_data
|
||||
]
|
||||
|
|
@ -63,7 +65,7 @@ class AssetListEpcData:
|
|||
epc_searcher = SearchEpc(
|
||||
address1=add1,
|
||||
postcode=pc,
|
||||
uprn=home["uprn"],
|
||||
uprn=home.get("uprn"),
|
||||
auth_token=self.epc_auth_token,
|
||||
os_api_key=""
|
||||
)
|
||||
|
|
@ -81,7 +83,9 @@ class AssetListEpcData:
|
|||
|
||||
extracted_data.append(
|
||||
{
|
||||
"uprn": home["uprn"],
|
||||
"uprn": home.get("uprn"),
|
||||
"address": home["address"],
|
||||
"postcode": home["postcode"],
|
||||
**find_epc_data,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue