From ed4cc1faf629dc6cac61d23e2fa183c08a962ddd Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 21 Aug 2025 11:19:53 +0800 Subject: [PATCH] :art: Improve av https://github.com/siyuan-note/siyuan/issues/15600 --- kernel/model/attribute_view.go | 4 ++++ kernel/treenode/av.go | 4 ++++ 2 files changed, 8 insertions(+) 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,