diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index add6a74de..07b36a59d 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -1275,6 +1275,10 @@ func SearchAttributeView(keyword string, excludeAvIDs []string) (ret []*AvSearch trees := filesys.LoadTrees(blockIDs) for _, avBlock := range avBlocks { + if 1 > len(avBlock.BlockIDs) { + continue + } + parentResult := buildSearchAttributeViewResult(avSearchTmpResults, avBlock.BlockIDs[0], trees, excludeAvIDs) if nil == parentResult { continue diff --git a/kernel/treenode/av.go b/kernel/treenode/av.go index 5bd3bebfe..1b1449e21 100644 --- a/kernel/treenode/av.go +++ b/kernel/treenode/av.go @@ -90,6 +90,10 @@ func BatchGetMirrorAttrViewBlocks(avIDs []string) (ret []*AvBlock) { for blockID := range bts { blockIDs = append(blockIDs, blockID) } + if 1 > len(blockIDs) { + continue + } + avBlock := &AvBlock{ AvID: avID, BlockIDs: blockIDs,