fix aliases cleanup

This commit is contained in:
Martin Geno 2016-06-19 12:49:44 +02:00
parent ffa9c1ba92
commit 9049b6d937
1 changed files with 2 additions and 1 deletions

View File

@ -35,11 +35,12 @@ func (api *ApiAliases) cleaner() {
//counter for the diffrent attribute
count := 0
if nodeinfo := node.Nodeinfo; nodeinfo != nil {
count += 3
count += 1
if alias.Hostname == nodeinfo.Hostname {
count -= 1
}
if alias.Location != nil && nodeinfo.Location != nil {
count += 2
if alias.Location.Latitude == nodeinfo.Location.Latitude {
count -= 1
}