mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-27 05:36:33 +08:00
Fix: metadata update issue (#12815)
### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
@ -675,8 +675,7 @@ class DocumentService(CommonService):
|
||||
if k not in old:
|
||||
old[k] = v
|
||||
continue
|
||||
if isinstance(v, dict):
|
||||
assert isinstance(old[k], dict)
|
||||
if isinstance(v, dict) and isinstance(old[k], dict):
|
||||
dfs_update(old[k], v)
|
||||
else:
|
||||
old[k] = v
|
||||
@ -863,11 +862,9 @@ class DocumentService(CommonService):
|
||||
key = upd.get("key")
|
||||
if not key:
|
||||
continue
|
||||
if key not in meta:
|
||||
meta[key] = upd.get("value")
|
||||
|
||||
new_value = upd.get("value")
|
||||
match_provided = "match" in upd
|
||||
match_provided = upd.get("match")
|
||||
if key not in meta:
|
||||
if match_provided:
|
||||
continue
|
||||
@ -880,7 +877,7 @@ class DocumentService(CommonService):
|
||||
if isinstance(new_value, list):
|
||||
meta[key] = dedupe_list(new_value)
|
||||
else:
|
||||
meta[key] = new_value
|
||||
meta[key].append(new_value)
|
||||
changed = True
|
||||
else:
|
||||
match_value = upd.get("match")
|
||||
|
||||
Reference in New Issue
Block a user