mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-23 11:36:38 +08:00
Feat: update and add new tests for web api apps (#12714)
### What problem does this PR solve? This PR adds missing web API tests (system, search, KB, LLM, plugin, connector). It also addresses a contract mismatch that was causing test failures: metadata updates did not persist new keys (update‑only behavior). ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) - [x] New Feature (non-breaking change which adds functionality) - [x] Other (please describe): Test coverage expansion and test helper instrumentation
This commit is contained in:
@ -824,11 +824,18 @@ class DocumentService(CommonService):
|
||||
changed = False
|
||||
for upd in updates:
|
||||
key = upd.get("key")
|
||||
if not key or key not in meta:
|
||||
if not key:
|
||||
continue
|
||||
|
||||
new_value = upd.get("value")
|
||||
match_provided = "match" in upd
|
||||
if key not in meta:
|
||||
if match_provided:
|
||||
continue
|
||||
meta[key] = dedupe_list(new_value) if isinstance(new_value, list) else new_value
|
||||
changed = True
|
||||
continue
|
||||
|
||||
if isinstance(meta[key], list):
|
||||
if not match_provided:
|
||||
if isinstance(new_value, list):
|
||||
|
||||
Reference in New Issue
Block a user