🎨 Improve database field default filling https://github.com/siyuan-note/siyuan/issues/11966

This commit is contained in:
Daniel 2025-08-03 10:20:25 +08:00
parent d115103f10
commit 564117575a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -4569,7 +4569,7 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
// 将绑定的块从属性视图中移除 // 将绑定的块从属性视图中移除
unbindBlockAv(tx, avID, rowID) unbindBlockAv(tx, avID, rowID)
} else { } else {
// 现在绑定了块 // 现在绑定了块
if oldBoundBlockID != val.BlockID { // 之前绑定的块和现在绑定的块不一样 if oldBoundBlockID != val.BlockID { // 之前绑定的块和现在绑定的块不一样
// 换绑块 // 换绑块
@ -4582,8 +4582,7 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
updateStaticText := true updateStaticText := true
_, blockText := getNodeAvBlockText(node) _, blockText := getNodeAvBlockText(node)
if "" == content { if "" == content {
val.Block.Content = blockText val.Block.Content = util.UnescapeHTML(blockText)
val.Block.Content = util.UnescapeHTML(val.Block.Content)
} else { } else {
if blockText == content { if blockText == content {
updateStaticText = false updateStaticText = false