refactor: remove debug print statements from home page version endpoint

This commit is contained in:
wxy
2026-04-01 17:22:49 +08:00
parent 70c3c7dd74
commit 5f7db778b5

View File

@@ -40,21 +40,14 @@ def get_system_version():
try:
db = SessionLocal()
try:
print(f"[DEBUG] 开始从数据库获取最新版本...")
current_version, version_info = HomePageRepository.get_latest_version_introduction(db)
if current_version:
print(f"[DEBUG] 数据库获取成功version={current_version}")
else:
print(f"[DEBUG] 数据库获取失败current_version=None")
finally:
db.close()
except Exception as e:
print(f"[DEBUG] 数据库查询异常:{e}")
pass
# 2⃣ 降级:使用环境变量中的版本号
if not current_version:
print(f"[DEBUG] 使用环境变量版本:{settings.SYSTEM_VERSION}")
current_version = settings.SYSTEM_VERSION
version_info = HomePageService.load_version_introduction(current_version)