|
@@ -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 实例
|