Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Database-bound block primary key supports setting static anchor text https://github.com/siyuan-note/siyuan/issues/10049

Daniela133e7d771b9
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index b84b723ca0..a8f7647bcd 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -3285,7 +3285,7 @@ func updateBlockValueStaticText(tx *Transaction, node *ast.Node, tree *parse.Tre
attrs := parse.IAL2Map(node.KramdownIAL)
attrs[av.NodeAttrViewStaticText+"-"+avID] = text
var err error
- if nil != tree {
+ if nil != tx {
err = setNodeAttrsWithTx(tx, node, tree, attrs)
} else {
err = setNodeAttrs(node, nil, attrs)