Skip to content

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

:art: Fixed mirroring database display view https://github.com/siyuan-note/siyuan/issues/15279

Daniel3ff2829c45b2
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go
index 0f943951d1..166f96326e 100644
--- a/kernel/model/transaction.go
+++ b/kernel/model/transaction.go
@@ -1176,7 +1176,15 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
v := attrView.GetView(attrView.ViewID)
if nil != v {
insertedNode.AttributeViewType = string(v.LayoutType)
- insertedNode.SetIALAttr(av.NodeAttrView, v.ID)
+ attrs := parse.IAL2Map(insertedNode.KramdownIAL)
+ if "" == attrs[av.NodeAttrView] {
+ attrs[av.NodeAttrView] = v.ID
+ err = setNodeAttrs(insertedNode, tree, attrs)
+ if err != nil {
+ logging.LogWarnf("set node [%s] attrs failed: %s", operation.BlockID, err)
+ return
+ }
+ }
}
}
}