fix(config): 更新配置成功时返回空字符串消息,修复保存设置 500 错误

This commit is contained in:
jxxghp
2026-08-17 10:34:45 +08:00
parent 2436bdf3dd
commit eefe1ec931
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -907,7 +907,8 @@ class Settings(BaseSettings, ConfigModel, LogConfigModel):
"""
更新 env 配置
"""
message = None
# 成功且无提示时使用空字符串,保证与 Tuple[bool, str] 返回类型一致
message = ""
is_converted = original_value is not None and str(original_value) != str(
converted_value
)