From 70380d742111d97509ab8cf671d5fe7642b6ea49 Mon Sep 17 00:00:00 2001 From: iSecloud <869820505@qq.com> Date: Thu, 26 Sep 2024 17:30:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(backend):=20=E4=BF=AE=E5=A4=8D=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98=20#7152?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: bugs --- dbm-ui/backend/db_services/mysql/cluster/handlers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dbm-ui/backend/db_services/mysql/cluster/handlers.py b/dbm-ui/backend/db_services/mysql/cluster/handlers.py index fcc5ff1707..2ffac24793 100644 --- a/dbm-ui/backend/db_services/mysql/cluster/handlers.py +++ b/dbm-ui/backend/db_services/mysql/cluster/handlers.py @@ -87,8 +87,10 @@ def _fill_spider_instance_info(_cluster: Cluster, _cluster_info: Dict): bk_biz_id=self.bk_biz_id, ) - clusters: QuerySet = Cluster.objects.prefetch_related("storageinstance_set", "proxyinstance_set").filter( - filter_conditions + clusters: QuerySet = ( + Cluster.objects.prefetch_related("storageinstance_set", "proxyinstance_set") + .filter(filter_conditions) + .distinct() ) cluster_db_module_ids: List[int] = [cluster.db_module_id for cluster in clusters] db_module_names: Dict[int, str] = {