Procházet zdrojové kódy

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

ayush.goyal před 4 roky
rodič
revize
adb20c6639
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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']