An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:art: Adding rows after setting the sort field in the database table view no longer fills in the default value https://github.com/siyuan-note/siyuan/issues/10486
Daniel7956a60dcc06
diff --git a/kernel/av/filter.go b/kernel/av/filter.goindex cc88993dd5..c0ca29abdc 100644--- a/kernel/av/filter.go+++ b/kernel/av/filter.go@@ -78,7 +78,15 @@ const ()func (filter *ViewFilter) GetAffectValue(key *Key) (ret *Value) {- // Improve adding rows of the filtered database table view https://github.com/siyuan-note/siyuan/issues/10025+ if nil != filter.Value && filter.Value.IsGenerated() {+ // 自动生成类型的过滤条件不设置默认值+ return nil+ }++ if nil == filter.Value && nil != filter.RelativeDate {+ // 相对日期今天的动态日期不设置默认值+ return nil+ }ret = filter.Value.Clone()switch filter.Value.Type {diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 8d714ad9b4..c58c6a62a2 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -1738,6 +1738,9 @@ func addAttributeViewBlock(avID, previousBlockID, blockID string, isDetached boofor _, keyValues := range attrView.KeyValues {if keyValues.Key.ID == filter.Column {newValue := filter.GetAffectValue(keyValues.Key)+ if nil == newValue {+ continue+ }newValue.ID = ast.NewNodeID()newValue.KeyID = keyValues.Key.IDnewValue.BlockID = blockID