mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
handle case of property already EPC C or above for funding
This commit is contained in:
parent
cf3a9af677
commit
aa03ef1b0f
1 changed files with 7 additions and 3 deletions
|
|
@ -231,8 +231,8 @@ def optimise_with_funding_paths(p, input_measures, housing_type, funding: Fundin
|
|||
# We now produce a fabric only path for ECO4
|
||||
# We add in generic insulation funding paths (where there is no fixed measure)
|
||||
# Heating controls are only eligible if installed as part of a heating upgrade and so we do not include them
|
||||
# here
|
||||
if housing_type == "Social":
|
||||
# here. We don't have an option if the property is a C or above
|
||||
if housing_type == "Social" and p.data["current-energy-rating"] not in ["C", "B", "A"]:
|
||||
funding_paths = (
|
||||
[
|
||||
{
|
||||
|
|
@ -301,7 +301,6 @@ def optimise_with_funding_paths(p, input_measures, housing_type, funding: Fundin
|
|||
# We log an error and skip this - we should not see any errors but we can probably get a reasonable
|
||||
# outcome for the end user without a complete termination of the process
|
||||
logger.error("Skipping fixed selection due to minimum insulation violation: %s", fixed)
|
||||
blah
|
||||
continue
|
||||
|
||||
scheme = _path_scheme(path_spec)
|
||||
|
|
@ -829,6 +828,11 @@ def make_funding_paths(p, input_measures, housing_type, funding: Funding):
|
|||
:param funding: The funding object that provides methods to check eligibility and calculate funding.
|
||||
:return:
|
||||
"""
|
||||
|
||||
# If the property is currently EPC C, there is no funding availability
|
||||
if p.data["current-energy-rating"] in ["C", "B", "A"]:
|
||||
return [], input_measures
|
||||
|
||||
# We handle the case of minimum insulation requirements. Whenever we have a heating system recommendation,
|
||||
# we *must* include an additional insulation measure, unless the property already has sufficient insulation.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue