mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 09:22:42 +08:00
skip same host
This commit is contained in:
@@ -299,6 +299,9 @@ func GetRelatedHosts(hostID string) []models.Host {
|
||||
hosts, err := GetAllHosts()
|
||||
if err == nil {
|
||||
for _, host := range hosts {
|
||||
if host.ID.String() == hostID {
|
||||
continue
|
||||
}
|
||||
networks := GetHostNetworks(host.ID.String())
|
||||
for _, network := range networks {
|
||||
if _, ok := networkMap[network]; ok {
|
||||
|
Reference in New Issue
Block a user