fix:update knowledge schema sql

update knowledge schema sql
This commit is contained in:
aries_ckt
2023-06-29 16:34:12 +08:00
parent 90f73a9e82
commit 9131fd574c
3 changed files with 9 additions and 7 deletions

View File

@@ -118,11 +118,11 @@ class KnowledgeDocumentDao:
count = knowledge_documents.scalar()
return count
# def update_knowledge_document(self, document: KnowledgeDocumentEntity):
# session = self.Session()
# updated_space = session.merge(document)
# session.commit()
# return updated_space.id
def update_knowledge_document(self, document: KnowledgeDocumentEntity):
session = self.Session()
updated_space = session.merge(document)
session.commit()
return updated_space.id
#
# def delete_knowledge_document(self, document_id: int):
# cursor = self.conn.cursor()

View File

@@ -76,6 +76,7 @@ class KnowledgeService:
status=SyncStatus.TODO.name,
last_sync=datetime.now(),
content=request.content,
result="",
)
knowledge_document_dao.create_knowledge_document(document)
return True