From 5d9220552bba9c46fc142472fe309d393c7379ee Mon Sep 17 00:00:00 2001 From: jyong <718720800@qq.com> Date: Mon, 9 Dec 2024 11:58:48 +0800 Subject: [PATCH] fix segment position issue --- api/controllers/console/datasets/datasets_segments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/controllers/console/datasets/datasets_segments.py b/api/controllers/console/datasets/datasets_segments.py index 580cdc59e78c2d..e705608341f312 100644 --- a/api/controllers/console/datasets/datasets_segments.py +++ b/api/controllers/console/datasets/datasets_segments.py @@ -75,7 +75,7 @@ def get(self, dataset_id, document_id): query = DocumentSegment.query.filter( DocumentSegment.document_id == str(document_id), DocumentSegment.tenant_id == current_user.current_tenant_id - ) + ).order_by(DocumentSegment.position.asc()) if status_list: query = query.filter(DocumentSegment.status.in_(status_list))