Skip to content

Commit 1669ba3

Browse files
fix: Error occurs when re-uploading after the license expires
1 parent 2f4042e commit 1669ba3

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

backend/common/core/sqlbot_cache.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def custom_key_builder(
3737

3838
# 支持属性路径格式
3939
parts = keyExpression.split('.')
40+
if not bound_args.arguments.get(parts[0]):
41+
return f"{base_key}{parts[0]}"
4042
value = bound_args.arguments[parts[0]]
4143
for part in parts[1:]:
4244
value = getattr(value, part)

backend/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async def lifespan(app: FastAPI):
5151
SQLBotLogUtil.info("✅ SQLBot 初始化完成")
5252
await sqlbot_xpack.core.clean_xpack_cache()
5353
await async_model_info() # 异步加密已有模型的密钥和地址
54+
await sqlbot_xpack.core.monitor_app(app)
5455
yield
5556
SQLBotLogUtil.info("SQLBot 应用关闭")
5657

0 commit comments

Comments
 (0)