🎨 Improve db filter on primary key

This commit is contained in:
Daniel 2024-05-08 21:26:56 +08:00
parent 9423caab45
commit 540ad2e535
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -2353,6 +2353,12 @@ func addAttributeViewBlock(avID, blockID, previousBlockID, addingBlockID, adding
continue
}
if av.KeyTypeBlock == newValue.Type {
// 如果是主键的话前面已经添加过了,这里仅修改内容
blockValue.Block.Content = newValue.Block.Content
break
}
newValue.ID = ast.NewNodeID()
newValue.KeyID = keyValues.Key.ID
newValue.BlockID = addingBlockID