Kaynağa Gözat

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)
tags/v0.16.0
Kevin Hu 9 ay önce
ebeveyn
işleme
c08382099a
No account linked to committer's email address
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4
    0
      api/apps/document_app.py

+ 4
- 0
api/apps/document_app.py Dosyayı Görüntüle

@@ -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…
İptal
Kaydet