mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-23 06:30:00 +08:00
Fix: add chunk api, empty content issue (#6390)
### What problem does this PR solve? #6387 ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
parent
efdfb39a33
commit
b5471978b0
@ -1044,7 +1044,7 @@ def add_chunk(tenant_id, dataset_id, document_id):
|
|||||||
)
|
)
|
||||||
doc = doc[0]
|
doc = doc[0]
|
||||||
req = request.json
|
req = request.json
|
||||||
if not req.get("content"):
|
if not str(req.get("content", "")).strip():
|
||||||
return get_error_data_result(message="`content` is required")
|
return get_error_data_result(message="`content` is required")
|
||||||
if "important_keywords" in req:
|
if "important_keywords" in req:
|
||||||
if not isinstance(req["important_keywords"], list):
|
if not isinstance(req["important_keywords"], list):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user