mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
handling error reporting
This commit is contained in:
parent
813d51e9f3
commit
bc5008bdd5
2 changed files with 6 additions and 5 deletions
|
|
@ -203,11 +203,11 @@ class Property:
|
||||||
# difference_record = self.epc_record - self.epc_record
|
# difference_record = self.epc_record - self.epc_record
|
||||||
|
|
||||||
# TODO: change these lower and replace in the settings file
|
# TODO: change these lower and replace in the settings file
|
||||||
print(
|
# print(
|
||||||
"CHANGE THE LATEST FIELD TO REMOVE NUMBER HABITABLE ROOMS IF WE WANT TO USE STARTING/ENDING"
|
# "CHANGE THE LATEST FIELD TO REMOVE NUMBER HABITABLE ROOMS IF WE WANT TO USE STARTING/ENDING"
|
||||||
)
|
# )
|
||||||
fixed_data_col_names = MANDATORY_FIXED_FEATURES + LATEST_FIELD
|
fixed_data_col_names = MANDATORY_FIXED_FEATURES + LATEST_FIELD
|
||||||
print("NEED TO CHANGE THE DASH TO LOWER CASE")
|
# print("NEED TO CHANGE THE DASH TO LOWER CASE")
|
||||||
fixed_data_col_names = [
|
fixed_data_col_names = [
|
||||||
x.lower().replace("_", "-") for x in fixed_data_col_names
|
x.lower().replace("_", "-") for x in fixed_data_col_names
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -750,7 +750,8 @@ async def build_mds(body: MdsRequest):
|
||||||
mds = Mds(property_instance=p, materials=materials, optimise_measures=optimise_measures)
|
mds = Mds(property_instance=p, materials=materials, optimise_measures=optimise_measures)
|
||||||
mds_recommendations, property_representative_recommendations, errors = mds.build()
|
mds_recommendations, property_representative_recommendations, errors = mds.build()
|
||||||
|
|
||||||
if errors:
|
if any([len(x) for x in errors.values()]):
|
||||||
|
blah
|
||||||
logger.info("Errors occurred during MDS build")
|
logger.info("Errors occurred during MDS build")
|
||||||
|
|
||||||
recommendations[p.id] = mds_recommendations
|
recommendations[p.id] = mds_recommendations
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue