mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Merge pull request #1054 from Hestia-Homes/bug/broken-epc-api
patching EPC api bug
This commit is contained in:
commit
351ae1675c
1 changed files with 9 additions and 0 deletions
|
|
@ -656,6 +656,15 @@ async def model_engine(body: PlanTriggerRequest):
|
||||||
# address_metadata=addr Switched off to remove injecting landlord inputs
|
# address_metadata=addr Switched off to remove injecting landlord inputs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Warning! The EPC API is broken and we are getting missing data for local authority and
|
||||||
|
# constituency. We're going to add some verbose handling here but there may be problems
|
||||||
|
if prepared_epc.local_authority is None:
|
||||||
|
# Fill
|
||||||
|
prepared_epc.local_authority = ""
|
||||||
|
|
||||||
|
if prepared_epc.constituency is None:
|
||||||
|
prepared_epc.constituency = ""
|
||||||
|
|
||||||
input_properties.append(
|
input_properties.append(
|
||||||
Property(
|
Property(
|
||||||
id=property_id,
|
id=property_id,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue