Skip to content

Commit

Permalink
fix(backend): 修复过滤重复问题 TencentBlueKing#7152
Browse files Browse the repository at this point in the history
fix: bugs
  • Loading branch information
iSecloud committed Sep 26, 2024
1 parent c21a7ba commit 70380d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dbm-ui/backend/db_services/mysql/cluster/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = {
Expand Down

0 comments on commit 70380d7

Please sign in to comment.