Ver Fonte

fix duplicacy of hosts

abhishek9686 há 1 ano atrás
pai
commit
63e4bf7105
1 ficheiros alterados com 1 adições e 0 exclusões
  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())
 				}
 			}