ragflow/sdk/python/test/test_http_api/test_dataset_mangement
Raghav Patidar 49d560583f
Fix: HTTP API Updates Read-Only Dataset Fields During Modification #5923 (#5937)
### What problem does this PR solve?

Fixes #5923 

Fixes the readonly variables from payload at
 /datasets/<dataset_id> 

_Briefly describe what this PR aims to solve. Include background context
that will help reviewers understand the purpose of the PR._

Now if user tries to modify readonly values then it will show " The
input parameters are invalid. "

invalid_keys = {"id", "embd_id", "chunk_num", "doc_num", "parser_id",
"create_date", "create_time", "created_by",
"status","token_num","update_date","update_time"}
    if any(key in req for key in invalid_keys):
return get_error_data_result(message="The input parameters are
invalid.")
i have include those readonly keys in invalid_keys

### Type of change

- [ ] Bug Fix (non-breaking change which fixes an issue)

---------

Co-authored-by: Raghav <2020csb1115@iitrpr.ac.in>
2025-03-12 10:27:02 +08:00
..
common.py Fix: HTTP API Updates Read-Only Dataset Fields During Modification #5923 (#5937) 2025-03-12 10:27:02 +08:00
conftest.py TEST: Added test cases for Delete Dataset HTTP API (#5770) 2025-03-07 17:44:51 +08:00
test_create_dataset.py Test: Update test cases per PR #5748 #5878 (#5894) 2025-03-11 13:35:28 +08:00
test_delete_dataset.py Test: Update test cases per PR #5778 (#5880) 2025-03-11 11:07:09 +08:00
test_list_dataset.py TEST: Added test cases for List Dataset HTTP API (#5856) 2025-03-10 18:29:33 +08:00
test_update_dataset.py TEST: Added test cases for Update Dataset HTTP API (#5924) 2025-03-11 18:55:11 +08:00