diff --git a/backend/app/services/product_service.py b/backend/app/services/product_service.py index 931cb5f..a01fbf1 100644 --- a/backend/app/services/product_service.py +++ b/backend/app/services/product_service.py @@ -102,6 +102,7 @@ async def get_product_by_serial(db: AsyncSession, serial_number: str) -> Product creator_map: dict[uuid.UUID, str] = {} if all_task_ids: from app.models.task_log import TaskLog + from sqlalchemy import func # 每个 task 取最早的 create 日志的 operator_id sub = ( select(