浏览代码

fix duplicacy of hosts

abhishek9686 1 年之前
父节点
当前提交
63e4bf7105
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      controllers/hosts.go

+ 1 - 0
controllers/hosts.go

@@ -94,6 +94,7 @@ func getHosts(w http.ResponseWriter, r *http.Request) {
 			for _, node := range filteredNodes {
 				if host, ok := currentHostsMap[node.HostID.String()]; ok {
 					currentHosts = append(currentHosts, host)
+					delete(currentHostsMap, host.ID.String())
 				}
 			}