Skip to content

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

:art: Improve av https://github.com/siyuan-note/siyuan/issues/15591

Daniel30bde33dd20c
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 3e5b14ae95..cbe33c7ba2 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -173,7 +173,9 @@ func getAttrViewAddingBlockDefaultValues(attrView *av.AttributeView, view, group
if nil != newValue {
if !av.MSelectExistOption(newValue.MSelect, groupView.GetGroupValue()) {
- newValue.MSelect = append(newValue.MSelect, &av.ValueSelect{Content: opt.Name, Color: opt.Color})
+ if 1 > len(newValue.MSelect) || av.KeyTypeMSelect == groupKey.Type {
+ newValue.MSelect = append(newValue.MSelect, &av.ValueSelect{Content: opt.Name, Color: opt.Color})
+ }
}
} else {
newValue = av.GetAttributeViewDefaultValue(ast.NewNodeID(), groupKey.ID, addingItemID, groupKey.Type)