From 8223d6ff2a2e9bda1bf6d4a3ec78f5c36571c288 Mon Sep 17 00:00:00 2001 From: Guille Date: Mon, 29 Jan 2024 07:00:01 +0100 Subject: [PATCH] add the total heating area to the results --- hub_api/config.py | 2 +- hub_api/persistence/retrofit_results.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hub_api/config.py b/hub_api/config.py index e51158a..a61fcd2 100644 --- a/hub_api/config.py +++ b/hub_api/config.py @@ -19,7 +19,7 @@ class Config: if platform.system() == 'Linux': dotenv_path = Path(dotenv_path).resolve() - environment = 'TEST' + environment = 'PROD' database_name = 'montreal_retrofit' self._database = DBControl(db_name=database_name, app_env=environment, dotenv_path=dotenv_path) diff --git a/hub_api/persistence/retrofit_results.py b/hub_api/persistence/retrofit_results.py index 7a86e65..0362e7e 100644 --- a/hub_api/persistence/retrofit_results.py +++ b/hub_api/persistence/retrofit_results.py @@ -31,7 +31,7 @@ class RetrofitResults(Resource, Config): _session = refresh_session(session_id, token, application_uuid) if _session is None: return Response(json.dumps({'error': 'unauthorized'}), status=403) - application_id = 2 + application_id = 1 user_id = 1 token = {'token': 1} else: @@ -58,7 +58,7 @@ class RetrofitResults(Resource, Config): 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_maintenance_costs = life_cycle[f'Scenario {scenario_id}']['global_maintenance_costs'] - + building_results['total_heating_area'] = building_info.total_heating_area building_results['costs'] = { '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'],