Explorar el Código

修复上传人为空的异常

luhaonan hace 3 semanas
padre
commit
334e2bffc0
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      agent/router/knowledge_base_router.py

+ 1 - 0
agent/router/knowledge_base_router.py

@@ -427,6 +427,7 @@ async def process_single_file(file: UploadFile, kb_id: int, db: Session, user_id
         knowledge_type=knowledge_type
     )
     db.add(db_file)
+    db.commit()
     
     # 创建用户数据关联
     relation_business = UserDataRelationBusiness(db)