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

Daniel4545cb11fef8
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 09f60ffb79..718fbf1615 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -1380,7 +1380,7 @@ func (tx *Transaction) doRemoveAttrViewView(operation *Operation) (ret *TxErr) {
attrs := parse.IAL2Map(node.KramdownIAL)
blockViewID := attrs[av.NodeAttrView]
if blockViewID == viewID {
- delete(attrs, av.NodeAttrView)
+ attrs[av.NodeAttrView] = attrView.ViewID
oldAttrs, e := setNodeAttrs0(node, attrs)
if nil != e {
logging.LogErrorf("set node attrs failed: %s", e)
@@ -1701,7 +1701,7 @@ func setAttributeViewPageSize(operation *Operation) (err error) {
return
}
- view, err := attrView.GetCurrentView(operation.ID)
+ view, err := getAttrViewViewByBlockID(attrView, operation.BlockID)
if nil != err {
return
}