Skip to content

Commit 906407a

Browse files
committed
feat: update Problem API to batch process request data in post method
1 parent a90f6c8 commit 906407a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/knowledge/views/problem.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def get(self, request: Request, workspace_id: str, knowledge_id: str):
5050
@has_permissions(PermissionConstants.DOCUMENT_EDIT.get_workspace_permission())
5151
def post(self, request: Request, workspace_id: str, knowledge_id: str):
5252
return result.success(ProblemSerializers.Create(
53-
data={'workspace_id': workspace_id, 'knowledge_id': knowledge_id, 'problem_list': request.data}
54-
).batch())
53+
data={'workspace_id': workspace_id, 'knowledge_id': knowledge_id}
54+
).batch(request.data))
5555

5656
class Paragraph(APIView):
5757
authentication_classes = [TokenAuth]

0 commit comments

Comments
 (0)