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

Daniel7136967a73fc
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 9f29738724..43e00e2ba9 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -4419,10 +4419,14 @@ func updateAttributeViewValue(tx *Transaction, attrView *av.AttributeView, keyID
func regenAttrViewViewGroups(attrView *av.AttributeView, keyID string) {
for _, view := range attrView.Views {
- if nil != view.Group && view.Group.Field == keyID {
+ if nil != view.Group {
groupKey, _ := attrView.GetKey(view.Group.Field)
if nil == groupKey {
- return
+ continue
+ }
+
+ if av.KeyTypeTemplate != groupKey.Type && view.Group.Field != keyID {
+ continue
}
genAttrViewViewGroups(view, attrView)