bugfix: check node is nil

This commit is contained in:
UlricQin 2021-01-13 10:10:00 +08:00
parent fab8568633
commit c182c70b8d
1 changed files with 4 additions and 0 deletions

View File

@ -643,6 +643,10 @@ func GetRelatedNidsForMon(nid int64, exclNid []int64) ([]int64, error) {
return nids, err
}
if node == nil {
return nids, nil
}
nodes, err := node.RelatedNodes()
if err != nil {
return nids, err