From a5a30d4dbbf6234c936ba90f3a69f8e0f75afac4 Mon Sep 17 00:00:00 2001 From: Ignacio Heredia Date: Wed, 4 Sep 2024 14:45:36 +0200 Subject: [PATCH] fix: do not replace active endpoint if `full_info` is False --- ai4papi/routers/v1/deployments/tools.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ai4papi/routers/v1/deployments/tools.py b/ai4papi/routers/v1/deployments/tools.py index c37ee71..3e1a41b 100644 --- a/ai4papi/routers/v1/deployments/tools.py +++ b/ai4papi/routers/v1/deployments/tools.py @@ -141,8 +141,9 @@ def get_deployment( if tool_id == 'ai4os-cvat': # Remove useless endpoints (they all point to same url) ignore = ['server', 'grafana'] - job['active_endpoints'] = [k for k in job['active_endpoints'] if k not in ignore] job['endpoints'] = {k: v for k, v in job['endpoints'].items() if k not in ignore} + if job['active_endpoints']: + job['active_endpoints'] = [k for k in job['active_endpoints'] if k not in ignore] return job