add the total heating area to the results

This commit is contained in:
Guille Gutierrez 2024-01-29 07:00:01 +01:00
parent d059a75e8d
commit 8223d6ff2a
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ class Config:
if platform.system() == 'Linux': if platform.system() == 'Linux':
dotenv_path = Path(dotenv_path).resolve() dotenv_path = Path(dotenv_path).resolve()
environment = 'TEST' environment = 'PROD'
database_name = 'montreal_retrofit' database_name = 'montreal_retrofit'
self._database = DBControl(db_name=database_name, app_env=environment, dotenv_path=dotenv_path) self._database = DBControl(db_name=database_name, app_env=environment, dotenv_path=dotenv_path)

View File

@ -31,7 +31,7 @@ class RetrofitResults(Resource, Config):
_session = refresh_session(session_id, token, application_uuid) _session = refresh_session(session_id, token, application_uuid)
if _session is None: if _session is None:
return Response(json.dumps({'error': 'unauthorized'}), status=403) return Response(json.dumps({'error': 'unauthorized'}), status=403)
application_id = 2 application_id = 1
user_id = 1 user_id = 1
token = {'token': 1} token = {'token': 1}
else: else:
@ -58,7 +58,7 @@ class RetrofitResults(Resource, Config):
global_operational_costs = life_cycle[f'Scenario {scenario_id}']['global_operational_costs'] global_operational_costs = life_cycle[f'Scenario {scenario_id}']['global_operational_costs']
global_capital_incomes = life_cycle[f'Scenario {scenario_id}']['global_capital_incomes'] global_capital_incomes = life_cycle[f'Scenario {scenario_id}']['global_capital_incomes']
global_maintenance_costs = life_cycle[f'Scenario {scenario_id}']['global_maintenance_costs'] global_maintenance_costs = life_cycle[f'Scenario {scenario_id}']['global_maintenance_costs']
building_results['total_heating_area'] = building_info.total_heating_area
building_results['costs'] = { building_results['costs'] = {
'total_capital_costs_skin': life_cycle[f'Scenario {scenario_id}']['total_capital_costs_skin'], 'total_capital_costs_skin': life_cycle[f'Scenario {scenario_id}']['total_capital_costs_skin'],
'total_capital_costs_systems': life_cycle[f'Scenario {scenario_id}']['total_capital_costs_systems'], 'total_capital_costs_systems': life_cycle[f'Scenario {scenario_id}']['total_capital_costs_systems'],