From 886f2d0ce7679f6b1042bc592e012de3c24bccd3 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 31 Aug 2024 22:56:11 +0800 Subject: [PATCH] :art: Improve database editing https://github.com/siyuan-note/siyuan/issues/12343 --- kernel/model/attribute_view.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index e36aa0cd1..675682cbf 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -3037,7 +3037,9 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string, if !val.IsDetached { // 现在绑定了块 // 将游离行绑定到新建的块上 bindBlockAv(tx, avID, rowID) - val.BlockID = val.Block.ID + if nil != val.Block { + val.BlockID = val.Block.ID + } } } else { // 之前绑定了块