From 732e4741c4cde4286a759f30f80bf7b303b120a3 Mon Sep 17 00:00:00 2001 From: Wang Qi Date: Mon, 18 May 2026 18:55:01 +0800 Subject: [PATCH] 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) --- api/apps/services/dataset_api_service.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/apps/services/dataset_api_service.py b/api/apps/services/dataset_api_service.py index 5927b780ec..8d5f512a35 100644 --- a/api/apps/services/dataset_api_service.py +++ b/api/apps/services/dataset_api_service.py @@ -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()]