From 3c91f9b5abc51d908c36ff033829b2e5a54fa8e8 Mon Sep 17 00:00:00 2001 From: crazywoola <100913391+crazywoola@users.noreply.github.com> Date: Mon, 11 Mar 2024 09:26:15 +0800 Subject: [PATCH] fix: dataset segements api (#2766) --- api/controllers/service_api/dataset/segment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/controllers/service_api/dataset/segment.py b/api/controllers/service_api/dataset/segment.py index d4a6b6aa4f1a28..3f7cfcaea86191 100644 --- a/api/controllers/service_api/dataset/segment.py +++ b/api/controllers/service_api/dataset/segment.py @@ -200,8 +200,8 @@ def post(self, tenant_id, dataset_id, document_id, segment_id): parser.add_argument('segments', type=dict, required=False, nullable=True, location='json') args = parser.parse_args() - SegmentService.segment_create_args_validate(args['segments'], document) - segment = SegmentService.update_segment(args['segments'], segment, document, dataset) + SegmentService.segment_create_args_validate(args, document) + segment = SegmentService.update_segment(args, segment, document, dataset) return { 'data': marshal(segment, segment_fields), 'doc_form': document.doc_form