From 3ff2829c45b204e8c8b5c5db53e4f3e05364d623 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 16 Jul 2025 22:30:40 +0800 Subject: [PATCH] :art: Fixed mirroring database display view https://github.com/siyuan-note/siyuan/issues/15279 --- kernel/model/transaction.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go index 0f943951d..166f96326 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 + } + } } } }