From 357ed70086b6664735c5a0abf39229a5512c40b3 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Wed, 10 Dec 2025 16:42:37 +0800 Subject: [PATCH] fix: Error occurs when re-uploading after the license expires --- backend/common/core/sqlbot_cache.py | 2 ++ backend/main.py | 1 + 2 files changed, 3 insertions(+) diff --git a/backend/common/core/sqlbot_cache.py b/backend/common/core/sqlbot_cache.py index 15018019..dda597b1 100644 --- a/backend/common/core/sqlbot_cache.py +++ b/backend/common/core/sqlbot_cache.py @@ -37,6 +37,8 @@ def custom_key_builder( # 支持属性路径格式 parts = keyExpression.split('.') + if not bound_args.arguments.get(parts[0]): + return f"{base_key}{parts[0]}" value = bound_args.arguments[parts[0]] for part in parts[1:]: value = getattr(value, part) diff --git a/backend/main.py b/backend/main.py index 48e124f7..dddc3e89 100644 --- a/backend/main.py +++ b/backend/main.py @@ -51,6 +51,7 @@ async def lifespan(app: FastAPI): SQLBotLogUtil.info("✅ SQLBot 初始化完成") await sqlbot_xpack.core.clean_xpack_cache() await async_model_info() # 异步加密已有模型的密钥和地址 + await sqlbot_xpack.core.monitor_app(app) yield SQLBotLogUtil.info("SQLBot 应用关闭")