mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
An EPC without property_type falls back to its dwelling_type 🟩
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
9b146dfaf4
commit
bf0e9343b2
1 changed files with 2 additions and 2 deletions
|
|
@ -107,8 +107,8 @@ def _resolved_property_types(
|
|||
).all()
|
||||
by_epc_source: dict[str, dict[int, str]] = {"lodged": {}, "predicted": {}}
|
||||
for epc in epcs:
|
||||
if epc.property_id is not None and epc.property_type is not None:
|
||||
value = epc.property_type
|
||||
value = epc.property_type or epc.dwelling_type
|
||||
if epc.property_id is not None and value:
|
||||
by_epc_source[epc.source][epc.property_id] = _PROPERTY_TYPE_CODES.get(
|
||||
value, value
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue