fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解
This commit is contained in:
@@ -2381,8 +2381,6 @@ async def create_attribute_template_endpoint(
|
||||
if not DB_AVAILABLE:
|
||||
raise HTTPException(status_code=500, detail="Database not available")
|
||||
|
||||
from db_manager import AttributeTemplate
|
||||
|
||||
db = get_db_manager()
|
||||
project = db.get_project(project_id)
|
||||
if not project:
|
||||
@@ -2602,8 +2600,6 @@ async def batch_set_entity_attributes_endpoint(
|
||||
if not DB_AVAILABLE:
|
||||
raise HTTPException(status_code=500, detail="Database not available")
|
||||
|
||||
from db_manager import EntityAttribute
|
||||
|
||||
db = get_db_manager()
|
||||
entity = db.get_entity(entity_id)
|
||||
if not entity:
|
||||
@@ -8667,8 +8663,6 @@ async def get_branding_css(tenant_id: str):
|
||||
manager = get_tenant_manager()
|
||||
css = manager.get_branding_css(tenant_id)
|
||||
|
||||
from fastapi.responses import PlainTextResponse
|
||||
|
||||
return PlainTextResponse(content=css, media_type="text/css")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user