Skip to content

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

:art: Database block support specified view https://github.com/siyuan-note/siyuan/issues/10443

Danielebabd66ebc31
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 718fbf1615..8bdf7cc270 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}