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()
|
hosts, err := GetAllHosts()
|
||||||
if err == nil {
|
if err == nil {
|
||||||
for _, host := range hosts {
|
for _, host := range hosts {
|
||||||
|
if host.ID.String() == hostID {
|
||||||
|
continue
|
||||||
|
}
|
||||||
networks := GetHostNetworks(host.ID.String())
|
networks := GetHostNetworks(host.ID.String())
|
||||||
for _, network := range networks {
|
for _, network := range networks {
|
||||||
if _, ok := networkMap[network]; ok {
|
if _, ok := networkMap[network]; ok {
|
||||||
|
Reference in New Issue
Block a user