From 7a99c78840a4e84b698874e01eaf53ac6b4aeeac Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Mon, 31 Mar 2025 11:17:25 +0800 Subject: [PATCH] fix: Processing for document export sheet with more than 32 characters (#2740) --- apps/dataset/serializers/document_serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/dataset/serializers/document_serializers.py b/apps/dataset/serializers/document_serializers.py index e7a40b771..5915877fc 100644 --- a/apps/dataset/serializers/document_serializers.py +++ b/apps/dataset/serializers/document_serializers.py @@ -703,6 +703,8 @@ class DocumentSerializers(ApiMixin, serializers.Serializer): @staticmethod def reset_document_name(document_name): + if document_name is not None: + document_name = document_name.strip()[0:29] if document_name is None or not Utils.valid_sheet_name(document_name): return "Sheet" return document_name.strip()