ragflow/api/apps/sdk
jiasu 3b218b2dc0
fix:passing empty database array when updating assistant (#9570)
### What problem does this PR solve?

When the `dataset_ids` parameter is omitted in the **update assistant**
request, Passing an empty array `[]` triggers a misleading
message"Dataset use different embedding models", while omitting the
field does not.
To fix this, we:
- Provide a default empty list: `ids = req.get("dataset_ids", [])`.  
- Replace the `is not None` check with a truthy check: `if ids:`.

**Files changed**  
`api/apps/sdk/chat.py`  
- L153: `ids = req.get("dataset_ids")` → `ids = req.get("dataset_ids",
[])`
- L156: `if ids is not None:` → `if ids:`

### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
2025-08-20 13:40:05 +08:00
..
agent.py Feat: Add http api to create, update, or delete agents. (#7515) 2025-05-12 17:59:53 +08:00
chat.py fix:passing empty database array when updating assistant (#9570) 2025-08-20 13:40:05 +08:00
dataset.py Fix:When deleting a knowledge base that is currently performing a parsing task, the parsing queue will not be deleted! (#9018) 2025-07-28 17:32:12 +08:00
dify_retrieval.py Fix: self-deployed LLM error, (#9217) 2025-08-05 09:49:47 +08:00
doc.py Refa: split services about llm. (#9450) 2025-08-13 16:41:01 +08:00
files.py Feat: Add file management HTTP_API (#8395) 2025-07-01 09:51:53 +08:00
session.py Feat: add meta filter to search app. (#9554) 2025-08-19 17:25:44 +08:00