mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-14 03:46:00 +08:00
Check meta data format in json map (#4461)
### What problem does this PR solve? #3690 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
d8346cb7a6
commit
c08382099a
@ -612,6 +612,10 @@ def set_meta():
|
||||
except Exception as e:
|
||||
return get_json_result(
|
||||
data=False, message=f'Json syntax error: {e}', code=settings.RetCode.ARGUMENT_ERROR)
|
||||
if not isinstance(meta, dict):
|
||||
return get_json_result(
|
||||
data=False, message='Meta data should be in Json map format, like {"key": "value"}', code=settings.RetCode.ARGUMENT_ERROR)
|
||||
|
||||
try:
|
||||
e, doc = DocumentService.get_by_id(req["doc_id"])
|
||||
if not e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user