🎨 Duplicate relation values in the Attribute Panel - Database Fix https://github.com/siyuan-note/siyuan/issues/10670

This commit is contained in:
Daniel 2024-03-20 22:30:21 +08:00
parent 34e46eee0b
commit fd1f283b2f
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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])
}