diff --git a/site/api/http_client.py b/site/api/http_client.py index 6de5998..38d61d9 100644 --- a/site/api/http_client.py +++ b/site/api/http_client.py @@ -86,6 +86,8 @@ class HttpClient: kwargs.setdefault("timeout", 10) r = self._session.get(f"{self._endpoint}{path}", **kwargs) r.raise_for_status() + if not r.text or not r.text.strip(): + return {} # пустой ответ (напр. validate-cfs успех) return r.json() def post(self, path, data=None, **kwargs): diff --git a/site/app.py b/site/app.py index 21c2075..7205f80 100644 --- a/site/app.py +++ b/site/app.py @@ -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.27" +VERSION = "1.1.28" 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")