diff --git a/pandora_console/include/functions_pandora_networkmap.php b/pandora_console/include/functions_pandora_networkmap.php index 91842977a7..a8a279c5a5 100644 --- a/pandora_console/include/functions_pandora_networkmap.php +++ b/pandora_console/include/functions_pandora_networkmap.php @@ -436,7 +436,7 @@ function networkmap_links_to_js_links($relations, $nodes_graph) { enterprise_include_once('include/functions_pandora_networkmap.php'); } - foreach ($relations as $relation) { + foreach ($relations as $key => $relation) { if (($relation['parent_type'] == 1) && ($relation['child_type'] == 1)) { $id_target_agent = agents_get_agent_id_by_module_id($relation['id_parent_source_data']); $id_source_agent = agents_get_agent_id_by_module_id($relation['id_child_source_data']); @@ -457,7 +457,7 @@ function networkmap_links_to_js_links($relations, $nodes_graph) { $item['id_db'] = get_relation_id($relation); } else { - $item['id_db'] = $relation['id']; + $item['id_db'] = $key; } $item['arrow_start'] = ''; $item['arrow_end'] = '';