mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
handle case of no respone
This commit is contained in:
parent
d562324dd9
commit
654251c084
1 changed files with 3 additions and 2 deletions
|
|
@ -102,8 +102,8 @@ def retrieve_find_my_epc_data(uprn: int, postcode: str, address: str, expected_e
|
|||
hot_water_text = bills.find_all('li')[1].text
|
||||
|
||||
resulting_data = {
|
||||
'uprn': uprn,
|
||||
'address': address,
|
||||
'extracted_uprn': uprn,
|
||||
'extracted_address': address,
|
||||
'epc_certificate': epc_certificate,
|
||||
'current_epc_rating': current_rating.split(' ')[-6],
|
||||
'current_epc_efficiency': int(current_rating.split(' ')[-1]),
|
||||
|
|
@ -163,6 +163,7 @@ def app():
|
|||
collected_data.append(
|
||||
{
|
||||
**response,
|
||||
"epc": property_data.to_dict(),
|
||||
"epc_directory": directory
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue