mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 09:43:10 +00:00
fix: update error message for non-existent files in document handling
This commit is contained in:
parent
55985a2460
commit
05409b8f90
|
|
@ -602,7 +602,7 @@ class DocumentSerializers(serializers.Serializer):
|
|||
self.is_valid(raise_exception=True)
|
||||
file = QuerySet(File).filter(source_id=self.data.get('document_id')).first()
|
||||
if not file:
|
||||
raise AppApiException(500, _('File not exist. Only manually uploaded documents are supported.'))
|
||||
raise AppApiException(500, _('File not exist. Only manually uploaded documents are supported'))
|
||||
return FileSerializer.Operate(data={'id': file.id}).get(with_valid=True)
|
||||
|
||||
def one(self, with_valid=False):
|
||||
|
|
|
|||
|
|
@ -8503,3 +8503,5 @@ msgstr ""
|
|||
msgid "Modify application access token"
|
||||
msgstr ""
|
||||
|
||||
msgid "File not exist. Only manually uploaded documents are supported"
|
||||
msgstr ""
|
||||
|
|
@ -8627,4 +8627,7 @@ msgid "Generate related documents"
|
|||
msgstr "生成相关文档"
|
||||
|
||||
msgid "Modify application access token"
|
||||
msgstr "修改应用程序访问令牌"
|
||||
msgstr "修改应用程序访问令牌"
|
||||
|
||||
msgid "File not exist. Only manually uploaded documents are supported"
|
||||
msgstr "文件不存在, 仅支持手动上传的文档"
|
||||
|
|
@ -8627,4 +8627,8 @@ msgid "Generate related documents"
|
|||
msgstr "生成相關文檔"
|
||||
|
||||
msgid "Modify application access token"
|
||||
msgstr "修改應用程序訪問權杖"
|
||||
msgstr "修改應用程序訪問權杖"
|
||||
|
||||
msgid "File not exist. Only manually uploaded documents are supported"
|
||||
msgstr "文件不存在, 僅支持手動上傳的文檔"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue