From 2984a197d957e571ce72d0146689f1f087857b38 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 6 May 2024 21:46:46 +0800 Subject: [PATCH] :bug: Case 1 https://github.com/siyuan-note/siyuan/issues/11251 --- kernel/model/attribute_view.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index d1c6fc6d1..85f6b897a 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -1574,6 +1574,8 @@ func updateAttributeViewColRelation(operation *Operation) (err error) { name = srcAv.Name + " " + operation.Format } backRelKey.Name = strings.TrimSpace(name) + } else { + backRelKey.Relation.BackKeyID = "" } } @@ -3188,12 +3190,12 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string, // 将游离行绑定到新建的块上 bindBlockAv(tx, avID, rowID) } - } else { // 之前绑定了块 + } else { // 之前绑定了块 if isUpdatingBlockKey { // 正在更新主键 if val.IsDetached { // 现在是游离行 // 将绑定的块从属性视图中移除 unbindBlockAv(tx, avID, rowID) - } else { // 现在绑定了块 + } else { // 现在绑定了块 if oldBoundBlockID != val.BlockID { // 之前绑定的块和现在绑定的块不一样 // 换绑块 unbindBlockAv(tx, avID, oldBoundBlockID)