🎨 Support modifying the primary key value of the binding block https://github.com/siyuan-note/siyuan/issues/9892

This commit is contained in:
Daniel 2023-12-18 13:11:56 +08:00
parent 56ec92ff88
commit 8363a3d811
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -1690,6 +1690,11 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
for _, keyValues := range attrView.KeyValues {
for _, value := range keyValues.Values {
if value.BlockID == operation.PreviousID {
if value.BlockID != operation.NextID {
// 换绑
unbindBlockAv(tx, operation.AvID, value.BlockID)
}
value.BlockID = operation.NextID
if nil != value.Block {
value.Block.ID = operation.NextID