From fd1f283b2f963dbbfe6c1ce7ee94b1466addd746 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 20 Mar 2024 22:30:21 +0800 Subject: [PATCH] :art: Duplicate relation values in the Attribute Panel - Database Fix https://github.com/siyuan-note/siyuan/issues/10670 --- kernel/model/attribute_view.go | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 42b55b75b..9108317e4 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -367,6 +367,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) { for _, blockValue := range destAv.GetBlockKeyValues().Values { blocks[blockValue.BlockID] = blockValue } + kv.Values[0].Relation.Contents = nil // 先清空 https://github.com/siyuan-note/siyuan/issues/10670 for _, bID := range kv.Values[0].Relation.BlockIDs { kv.Values[0].Relation.Contents = append(kv.Values[0].Relation.Contents, blocks[bID]) }