浏览代码

fix error for files from filemanager (#2323)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.11.0
Kevin Hu 1年前
父节点
当前提交
4b57177523
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      api/db/services/file2document_service.py

+ 1
- 1
api/db/services/file2document_service.py 查看文件

@@ -76,7 +76,7 @@ class File2DocumentService(CommonService):
f2d = cls.get_by_file_id(file_id)
if f2d:
file = File.get_by_id(f2d[0].file_id)
if file.source_type == FileSource.LOCAL:
if not file.source_type or file.source_type == FileSource.LOCAL:
return file.parent_id, file.location
doc_id = f2d[0].document_id


正在加载...
取消
保存