Преглед изворни кода

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…
Откажи
Сачувај