modified env var fetch method

This commit is contained in:
Luis Aleixo 2023-09-13 09:49:06 +02:00
parent 33888b13b8
commit 4f1a497954
2 changed files with 3 additions and 2 deletions

View file

@ -435,7 +435,8 @@ def make_app(
'data_service_client_password': os.environ.get('DATA_SERVICE_CLIENT_PASSWORD', None),
}
data_service = None
if bool(os.environ.get('DATA_SERVICE_ENABLED', False)):
data_service_enabled = os.environ.get('DATA_SERVICE_ENABLED', 'False').lower() == 'true'
if data_service_enabled:
data_service = DataService(data_service_credentials)
if debug:

View file

@ -338,7 +338,7 @@ def manufacture_viral_load_scenarios_percentiles(model: mc.ExposureModel) -> typ
specific_vl_scenario = dataclass_utils.nested_replace(model,
{'concentration_model.infected.virus.viral_load_in_sputum': vl}
)
scenarios[vl] = np.mean(specific_vl_scenario.infection_probability())
scenarios[str(vl)] = np.mean(specific_vl_scenario.infection_probability())
return scenarios