fix aliases cleanup
This commit is contained in:
parent
ffa9c1ba92
commit
9049b6d937
@ -35,11 +35,12 @@ func (api *ApiAliases) cleaner() {
|
|||||||
//counter for the diffrent attribute
|
//counter for the diffrent attribute
|
||||||
count := 0
|
count := 0
|
||||||
if nodeinfo := node.Nodeinfo; nodeinfo != nil {
|
if nodeinfo := node.Nodeinfo; nodeinfo != nil {
|
||||||
count += 3
|
count += 1
|
||||||
if alias.Hostname == nodeinfo.Hostname {
|
if alias.Hostname == nodeinfo.Hostname {
|
||||||
count -= 1
|
count -= 1
|
||||||
}
|
}
|
||||||
if alias.Location != nil && nodeinfo.Location != nil {
|
if alias.Location != nil && nodeinfo.Location != nil {
|
||||||
|
count += 2
|
||||||
if alias.Location.Latitude == nodeinfo.Location.Latitude {
|
if alias.Location.Latitude == nodeinfo.Location.Latitude {
|
||||||
count -= 1
|
count -= 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user