Fix: empty dataset parser id. (#5878)

### What problem does this PR solve?

#5709

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2025-03-11 10:23:08 +08:00 committed by GitHub
parent 6f9cd96ec5
commit 780ee2b2be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -182,7 +182,7 @@ def create(tenant_id):
req.update(mapped_keys)
flds = list(req.keys())
for f in flds:
if req[f] == "" and f in ["permission", "chunk_method"]:
if req[f] == "" and f in ["permission", "parser_id", "chunk_method"]:
del req[f]
if not KnowledgebaseService.save(**req):
return get_error_data_result(message="Create dataset error.(Database error)")