mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-30 01:32:49 +00:00
refactor: simplify data handling in ApplicationChatRecordAddKnowledgeSerializer
This commit is contained in:
parent
bf9918250c
commit
ba3a2153e0
|
|
@ -126,8 +126,8 @@ class ApplicationChatRecordAddKnowledge(APIView):
|
|||
CompareConstants.AND),
|
||||
RoleConstants.WORKSPACE_MANAGE.get_workspace_role())
|
||||
def post(self, request: Request, workspace_id: str, application_id: str):
|
||||
return result.success(ApplicationChatRecordAddKnowledgeSerializer(
|
||||
data={'workspace_id': workspace_id, 'application_id': application_id}).post_improve(request.data))
|
||||
return result.success(ApplicationChatRecordAddKnowledgeSerializer().post_improve(
|
||||
{'workspace_id': workspace_id, 'application_id': application_id, **request.data}))
|
||||
|
||||
|
||||
class ApplicationChatRecordImprove(APIView):
|
||||
|
|
|
|||
Loading…
Reference in New Issue