Skip to content

Commit

Permalink
feat: return empty tag list after getting null
Browse files Browse the repository at this point in the history
  • Loading branch information
hetao92 committed Dec 29, 2020
1 parent 910e65a commit 560058f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions service/dao/dao.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ func getVertexInfo(valWarp *nebula.ValueWrapper, data map[string]common.Any) (ma
}
id := node.GetID()
data["vid"] = id
tags := node.GetTags()
data["tags"] = tags
tags := make([]string, 0)
properties := make(map[string]map[string]common.Any)
for _, tagName := range tags {
for _, tagName := range node.GetTags() {
tags = append(tags, tagName)
props, err := node.Properties(tagName)
if err != nil {
return nil, err
Expand All @@ -93,6 +93,7 @@ func getVertexInfo(valWarp *nebula.ValueWrapper, data map[string]common.Any) (ma
}
properties[tagName] = _props
}
data["tags"] = tags
data["properties"] = properties
return data, nil
}
Expand Down

0 comments on commit 560058f

Please sign in to comment.