wrapped data service enabled env. variable in try/except block

This commit is contained in:
Luis Aleixo 2024-05-27 10:50:59 +02:00
parent ee98b1d308
commit fc03fce082

View file

@ -573,7 +573,11 @@ def make_app(
data_registry = DataRegistry()
data_service = None
data_service_enabled = int(os.environ.get('DATA_SERVICE_ENABLED', 0))
try:
data_service_enabled = int(os.environ.get('DATA_SERVICE_ENABLED', 0))
except ValueError:
data_service_enabled = None
if data_service_enabled: data_service = DataService.create()
return Application(