From ebabd66ebc312c8c061c2131221102c73ef80ced Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Mon, 4 Mar 2024 23:07:01 +0800 Subject: [PATCH] :art: Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443 --- kernel/model/attribute_view.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 718fbf161..8bdf7cc27 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -1345,6 +1345,7 @@ func (tx *Transaction) doRemoveAttrViewView(operation *Operation) (ret *TxErr) { if 0 > index { index = 0 } + attrView.ViewID = attrView.Views[index].ID mirrorBlocks := av.GetMirrorBlockIDs(avID) mirrorBlockTree := map[string]*parse.Tree{} @@ -1399,7 +1400,6 @@ func (tx *Transaction) doRemoveAttrViewView(operation *Operation) (ret *TxErr) { } } - attrView.ViewID = attrView.Views[index].ID if err = av.SaveAttributeView(attrView); nil != err { logging.LogErrorf("save attribute view [%s] failed: %s", avID, err) return &TxErr{code: TxErrCodeWriteTree, msg: err.Error(), id: avID}