Skip to content

Commit

Permalink
fix: 修复资源拓扑报错 --bug=130927145 (#3021)
Browse files Browse the repository at this point in the history
  • Loading branch information
rxwycdh authored Sep 17, 2024
1 parent ab1f841 commit 1e1039e
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions bkmonitor/packages/apm_web/topo/handle/relation/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,18 +487,15 @@ def _process_edges(cls, all_edges, layer_nodes):

if from_node_merged != to_node_merged:
merged_edge = (from_node_merged, to_node_merged)
merged_edges_mapping[merged_edge].append(
{
"source": from_node,
"target": to_node,
}
)
merged_edges_mapping[merged_edge].append((from_node, to_node))

return [
{
"source": e[0],
"target": e[1],
"original": list(set(original_edges)) if len(original_edges) > 1 else [],
"original": [{"source": i[0], "target": i[1]} for i in set(original_edges)]
if len(original_edges) > 1
else [],
}
for e, original_edges in merged_edges_mapping.items()
]
Expand Down

0 comments on commit 1e1039e

Please sign in to comment.