Selaa lähdekoodia

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

ayush.goyal 4 vuotta sitten
vanhempi
commit
adb20c6639
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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']