浏览代码

更新 'routers/api/Knowledge/__init__.py'

许国洋 1 年之前
父节点
当前提交
71fd4784f1
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      routers/api/Knowledge/__init__.py

+ 3 - 2
routers/api/Knowledge/__init__.py

@@ -82,7 +82,7 @@ async def create_knowledge(request: Request, db: Session = Depends(get_db)):
 
         # 验证必需的字段
         required_fields = ['reportName', 'subject', 'eventType', 'publishingUnit', 'publishDate', 'summary',
-                           'notificationType', 'fileNames']
+                           'fileNames']
         missing_fields = [field for field in required_fields if field not in body]
         print('missing_fields',missing_fields)
         if missing_fields:
@@ -100,7 +100,8 @@ async def create_knowledge(request: Request, db: Session = Depends(get_db)):
         publishingUnit = body["publishingUnit"]
         publishDate = body["publishDate"]
         summary = body["summary"]
-        notificationType = body["notificationType"]
+        # notificationType = body["notificationType"]
+        notificationType = "总结报告"
         fileNames = body["fileNames"]  # 注意:这里假设它是列表
 
         # 创建 KnowledgeBase 实例