소스 검색

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())
 				}
 			}