Skip to content

Commit 349c9f6

Browse files
committed
fix: Download template error
--bug=1051908 --user=王孝刚 【知识库】导出的文档打开后里面为错误日志,无文档内容,导出的压缩包不能解压 https://www.tapd.cn/57709429/s/1650087
1 parent 5bba331 commit 349c9f6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/dataset/serializers/document_serializers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
from django.db.models import QuerySet, Count
2424
from django.db.models.functions import Substr, Reverse
2525
from django.http import HttpResponse
26-
from django.utils.translation import gettext_lazy as _, gettext
26+
from django.utils.translation import gettext_lazy as _, gettext, to_locale
27+
from django.utils.translation import get_language
2728
from drf_yasg import openapi
2829
from openpyxl.cell.cell import ILLEGAL_CHARACTERS_RE
2930
from rest_framework import serializers
@@ -65,8 +66,6 @@
6566
embedding_by_document_list
6667
from setting.models import Model
6768
from smartdoc.conf import PROJECT_DIR
68-
from django.utils.translation import gettext_lazy as _, gettext, to_locale
69-
from django.utils.translation import get_language
7069

7170
parse_qa_handle_list = [XlsParseQAHandle(), CsvParseQAHandle(), XlsxParseQAHandle(), ZipParseQAHandle()]
7271
parse_table_handle_list = [CsvSplitTableHandle(), XlsSplitTableHandle(), XlsxSplitTableHandle()]

0 commit comments

Comments
 (0)