prevent cache from storing empty values
This commit is contained in:
parent
8437520018
commit
03c82c7463
1 changed files with 2 additions and 1 deletions
|
|
@ -300,8 +300,9 @@ func (qs *QuadStore) NameOf(v graph.Value) string {
|
|||
err := qs.db.C("nodes").FindId(v.(string)).One(&node)
|
||||
if err != nil {
|
||||
glog.Errorf("Error: Couldn't retrieve node %s %v", v, err)
|
||||
} else if node.ID != "" && node.Name != "" {
|
||||
qs.ids.Put(v.(string), node.Name)
|
||||
}
|
||||
qs.ids.Put(v.(string), node.Name)
|
||||
return node.Name
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue