Skip to content

Commit

Permalink
fix: bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud committed Dec 13, 2024
1 parent 60f11e6 commit 395cf06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dbm-ui/backend/db_services/dbresource/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ def _format_resource_fields(data, _cloud_info, _biz_infos, _tag_infos):
return resource_data

@classmethod
def standardized_resource_host(cls, hosts, bk_biz_id=None):
def standardized_resource_host(cls, hosts):
"""标准化主机信息,将cc字段统一成资源池字段"""
host_ids = [host["bk_host_id"] for host in hosts]
# 获取主机通用信息
hosts = ResourceQueryHelper.search_cc_hosts(role_host_ids=host_ids)
# 获取主机拓扑信息
host_topos = CCApi.find_host_biz_relations({"bk_host_id": host_ids})
host_biz_map = [{host["bk_host_id"]: host["bk_biz_id"]} for host in host_topos]
host_biz_map = {host["bk_host_id"]: host["bk_biz_id"] for host in host_topos}
# 补充主机信息
for host in hosts:
host.update(
Expand Down

0 comments on commit 395cf06

Please sign in to comment.