v1.1.30: fix json.loads('') in _resolve_ref_svc

This commit is contained in:
2026-07-29 13:43:30 +04:00
parent 0092a4a0e3
commit b4980aed76
2 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ from routes.api import bp as api_bp
from routes.api_test import bp as api_test_bp
# Версия — меняется при КАЖДОМ изменении кода. Показывается в топбаре UI.
VERSION = "1.1.29"
VERSION = "1.1.30"
app = Flask(__name__, template_folder="templates", static_folder="static")
app.config["NUBES_API_ENDPOINT"] = os.getenv("NUBES_API_ENDPOINT", "https://lk-api-gateway-test.ngcloud.ru/api/v1/svc")
+6 -1
View File
@@ -291,7 +291,12 @@ def _resolve_ref_svc(client, cfs_params, params):
if not isinstance(dd, dict):
continue
pid = str(p["svcOperationCfsParamId"])
user_val = json.loads(params.get(pid, "{}")) if pid in params else {}
user_val = {}
if pid in params:
try:
user_val = json.loads(params[pid]) if params[pid] else {}
except (json.JSONDecodeError, ValueError):
user_val = {}
for sk, sv in dd.items():
ref_id = sv.get("refSvcId")
if not ref_id: