Skip to content

[Bug]: Updating Dataset via HTTP API Allows Empty chunk_method/permission Fields via Empty Strings #5920

Closed
@asiroliu

Description

@asiroliu

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

RAGFlow workspace code commit ID

x

RAGFlow image version

ecb813b8a694 (infiniflow/ragflow:nightly)

Other environment information

Actual behavior

Empty Strings in chunk_method/permission Fields via HTTP API Reset Values Instead of Retaining/Defaulting

Expected behavior

  • Field Retention: Empty string inputs for chunk_method or permission should ​preserve existing values (ignore empty updates).

​OR

  • Default Fallback: Empty values should trigger server-side defaults (e.g., chunk_method: "naive", permission: "me").

OR

  • ​Validation Enforcement: The API should reject empty strings for these fields if null/empty is disallowed by business logic.

Steps to reproduce

1. Send a PUT request with empty string payload for chunk_method or permission:

payload = {"chunk_method": ""}  # or {"permission": ""}  
response = requests.put(f'http://127.0.0.1:9380/api/v1/datasets/{dataset_id}', json=payload)  

2. Observe the API response:

{"code": 0}  // Success status  

3. Query the dataset via the list API:

{  
    "code": 0,  
    "data": [  
        {  
            "chunk_method": "",  // Field reset to empty  
            "permission": "",     // Field reset to empty  
            // ...other fields  
        }  
    ]  
}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions