Fix: correctly update parser method & correct vllm pdf parser (#10441)

### What problem does this PR solve?

Fix: correctly update parser method

### Type of change

- [X] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Billy Bao
2025-10-09 19:03:12 +08:00
committed by GitHub
parent 1fc2889f98
commit f04c9e2937
2 changed files with 7 additions and 3 deletions

View File

@ -557,8 +557,8 @@ def get(doc_id):
@login_required
@validate_request("doc_id")
def change_parser():
req = request.json
req = request.json
if not DocumentService.accessible(req["doc_id"], current_user.id):
return get_json_result(data=False, message="No authorization.", code=settings.RetCode.AUTHENTICATION_ERROR)
@ -582,7 +582,7 @@ def change_parser():
settings.docStoreConn.delete({"doc_id": doc.id}, search.index_name(tenant_id), doc.kb_id)
try:
if "pipeline_id" in req:
if "pipeline_id" in req and req["pipeline_id"] != "":
if doc.pipeline_id == req["pipeline_id"]:
return get_json_result(data=True)
DocumentService.update_by_id(doc.id, {"pipeline_id": req["pipeline_id"]})