fix: auto-fix code issues (cron)
- 修复缺失导入: main.py 添加 AttributeTemplate 和 EntityAttribute 导入 - 修复裸异常捕获: 将 BaseException 改为具体异常类型 - neo4j_manager.py: Exception - main.py: json.JSONDecodeError, ValueError, Exception - export_manager.py: AttributeError, TypeError, ValueError - localization_manager.py: ValueError, AttributeError - performance_manager.py: TypeError, ValueError - plugin_manager.py: OSError, IOError - 修复部分行长度问题: security_manager.py 长行拆分
This commit is contained in:
@@ -297,9 +297,12 @@ class SecurityManager:
|
||||
""")
|
||||
|
||||
# 创建索引
|
||||
cursor.execute("CREATE INDEX IF NOT EXISTS idx_audit_logs_user ON audit_logs(user_id)")
|
||||
cursor.execute(
|
||||
"CREATE INDEX IF NOT EXISTS idx_audit_logs_resource ON audit_logs(resource_type, resource_id)"
|
||||
"CREATE INDEX IF NOT EXISTS idx_audit_logs_user ON audit_logs(user_id)"
|
||||
)
|
||||
cursor.execute(
|
||||
"CREATE INDEX IF NOT EXISTS idx_audit_logs_resource "
|
||||
"ON audit_logs(resource_type, resource_id)"
|
||||
)
|
||||
cursor.execute(
|
||||
"CREATE INDEX IF NOT EXISTS idx_audit_logs_action ON audit_logs(action_type)"
|
||||
|
||||
Reference in New Issue
Block a user