Browse Source

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

许国洋 10 months ago
parent
commit
760ceed45c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      routers/api/Knowledge/__init__.py

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

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