Bugfix: fix tag show (#14980)

### What problem does this PR solve?

Bugfix: fix tag show

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Wang Qi
2026-05-18 18:55:01 +08:00
committed by GitHub
parent 2dbe3b8a62
commit 732e4741c4

View File

@@ -598,9 +598,8 @@ def aggregate_tags(dataset_ids: list[str], tenant_id: str):
merged = {}
for kb_tenant_id, kb_ids in dataset_ids_by_tenant.items():
for bucket in settings.retriever.all_tags(kb_tenant_id, kb_ids):
tag = bucket["value"]
merged[tag] = merged.get(tag, 0) + bucket["count"]
for tag, count in settings.retriever.all_tags(kb_tenant_id, kb_ids):
merged[tag] = merged.get(tag, 0) + count
return True, [{"value": tag, "count": count} for tag, count in merged.items()]