Explorar o código

fix duplicacy of hosts

abhishek9686 hai 1 ano
pai
achega
63e4bf7105
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  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())
 				}
 			}