Преглед на файлове

assign dataset indexing_technique to args if not explicitly provided (#20597)

tags/1.4.2
Abdullah AlOsaimi преди 5 месеца
родител
ревизия
ad8e79c440
No account linked to committer's email address
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4
    1
      api/controllers/service_api/dataset/document.py

+ 4
- 1
api/controllers/service_api/dataset/document.py Целия файл

@@ -175,8 +175,11 @@ class DocumentAddByFileApi(DatasetApiResource):

if not dataset:
raise ValueError("Dataset does not exist.")
if not dataset.indexing_technique and not args.get("indexing_technique"):

indexing_technique = args.get("indexing_technique") or dataset.indexing_technique
if not indexing_technique:
raise ValueError("indexing_technique is required.")
args["indexing_technique"] = indexing_technique

# save file info
file = request.files["file"]

Loading…
Отказ
Запис