浏览代码

[importer] 'NoneType' object has no attribute 'netnormpath' because of request.fs is not defined

ayush.goyal 4 年之前
父节点
当前提交
adb20c6639
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      desktop/libs/indexer/src/indexer/api3.py

+ 1 - 1
desktop/libs/indexer/src/indexer/api3.py

@@ -456,7 +456,7 @@ def importer_submit(request):
       stream = request.fs.open(path)
       file_encoding = check_encoding(stream.read(10000))
 
-  if destination['ouputFormat'] in ('database', 'table'):
+  if destination['ouputFormat'] in ('database', 'table') and request.fs is not None:
     destination['nonDefaultLocation'] = request.fs.netnormpath(destination['nonDefaultLocation']) \
         if destination['nonDefaultLocation'] else destination['nonDefaultLocation']