Skip to content

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

:art: Database grouping by field https://github.com/siyuan-note/siyuan/issues/10964

Daniel3c0933beacb0
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 3ac59fc0f2..f1e0b0992b 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -107,7 +107,7 @@ func removeAttributeViewGroup(avID, blockID string) (err error) {
return err
}
- view.Group, view.Groups, view.GroupUpdated = nil, nil, 0
+ removeAttributeViewGroup0(view)
err = av.SaveAttributeView(attrView)
if err != nil {
logging.LogErrorf("save attribute view [%s] failed: %s", avID, err)
@@ -116,6 +116,10 @@ func removeAttributeViewGroup(avID, blockID string) (err error) {
return nil
}
+func removeAttributeViewGroup0(view *av.View) {
+ view.Group, view.Groups, view.GroupUpdated = nil, nil, 0
+}
+
func (tx *Transaction) doSyncAttrViewTableColWidth(operation *Operation) (ret *TxErr) {
err := syncAttrViewTableColWidth(operation)
if err != nil {
@@ -3911,6 +3915,10 @@ func RemoveAttributeViewKey(avID, keyID string, removeRelationDest bool) (err er
}
}
+ for _, view := range attrView.Views {
+ removeAttributeViewGroup0(view)
+ }
+
err = av.SaveAttributeView(attrView)
return
}