🤖 自动格式化代码 [skip ci]

This commit is contained in:
github-actions[bot]
2025-05-16 09:35:00 +00:00
parent e4f7c1fe62
commit 335c62c50f
2 changed files with 1 additions and 7 deletions

View File

@@ -392,10 +392,6 @@ class EmojiManager:
# try:
# # Ensure Peewee database connection is up and tables are created
# self._initialized = True
# except Exception as e:
# logger.exception(f"初始化表情管理器失败: {e}")

View File

@@ -336,9 +336,7 @@ def initialize_database():
model_fields = model._meta.fields
for field_name in model_fields:
if field_name not in existing_columns:
logger.error(
f"'{table_name}' 缺失字段 '{field_name}',请手动迁移数据库结构后重启程序。"
)
logger.error(f"'{table_name}' 缺失字段 '{field_name}',请手动迁移数据库结构后重启程序。")
sys.exit(1)
except Exception as e:
logger.exception(f"检查表或字段是否存在时出错: {e}")