Browse Source

:art: Improve database editing https://github.com/siyuan-note/siyuan/issues/12343

Daniel 10 months ago
parent
commit
886f2d0ce7
1 changed files with 3 additions and 1 deletions
  1. 3 1
      kernel/model/attribute_view.go

+ 3 - 1
kernel/model/attribute_view.go

@@ -3037,7 +3037,9 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
 		if !val.IsDetached { // 现在绑定了块
 		if !val.IsDetached { // 现在绑定了块
 			// 将游离行绑定到新建的块上
 			// 将游离行绑定到新建的块上
 			bindBlockAv(tx, avID, rowID)
 			bindBlockAv(tx, avID, rowID)
-			val.BlockID = val.Block.ID
+			if nil != val.Block {
+				val.BlockID = val.Block.ID
+			}
 		}
 		}
 	} else {
 	} else {
 		// 之前绑定了块
 		// 之前绑定了块