fix: 修复or_局部导入遮蔽模块级导入导致UnboundLocalError + Drawer改用size
1. product_service.py: 删除函数内两处 from sqlalchemy import or_ Python解析器看到函数内的import就把or_当局部变量, 在赋值前使用就报UnboundLocalError 模块顶部已有 import or_, 函数内无需重复导入 2. AdminDashboard.tsx: Drawer width→size (Antd v6 deprecation)
This commit is contained in:
@ -289,7 +289,6 @@ async def update_overall_status(
|
||||
# SUPER_ADMIN 直接放行
|
||||
if user_role != "SUPER_ADMIN":
|
||||
# 检查当前用户是否是该产品主线任务的负责人
|
||||
from sqlalchemy import or_
|
||||
main_task_result = await db.execute(
|
||||
select(Task).where(
|
||||
Task.product_id == product.id,
|
||||
@ -416,7 +415,7 @@ async def get_all_products(
|
||||
overall_names: dict[uuid.UUID, str] = {}
|
||||
main_assignees: dict[uuid.UUID, str] = {}
|
||||
if product_ids:
|
||||
from sqlalchemy import and_, or_, func as sa_func, case as sa_case
|
||||
from sqlalchemy import and_, func as sa_func, case as sa_case
|
||||
main_where = and_(
|
||||
Task.product_id.in_(product_ids),
|
||||
or_(
|
||||
|
||||
Reference in New Issue
Block a user