Просмотр исходного кода

get dict key indexing_technique in DocumentAddByFileApi (#3615)

Co-authored-by: songqijun <songqijun@qipeng.com>
sqj8899 1 год назад
Родитель
Сommit
0a56c522eb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      api/controllers/service_api/dataset/document.py

+ 1 - 1
api/controllers/service_api/dataset/document.py

@@ -174,7 +174,7 @@ class DocumentAddByFileApi(DatasetApiResource):
 
         if not dataset:
             raise ValueError('Dataset is not exist.')
-        if not dataset.indexing_technique and not args['indexing_technique']:
+        if not dataset.indexing_technique and not args.get('indexing_technique'):
             raise ValueError('indexing_technique is required.')
 
         # save file info