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/15520

Daniel8ddac7791533
diff --git a/kernel/sql/av.go b/kernel/sql/av.go
index 53bf77ee6b..f7d3d18683 100644
--- a/kernel/sql/av.go
+++ b/kernel/sql/av.go
@@ -310,10 +310,6 @@ func fillAttributeViewBaseValue(baseValue *av.BaseValue, fieldID, itemID string,
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeCreated}
case av.KeyTypeUpdated: // 填充更新时间字段值,后面再渲染
baseValue.Value = &av.Value{ID: baseValue.ID, KeyID: fieldID, BlockID: itemID, Type: av.KeyTypeUpdated}
- case av.KeyTypeRelation: // 清空关联字段值,后面再渲染 https://ld246.com/article/1703831044435
- if nil != baseValue.Value && nil != baseValue.Value.Relation {
- baseValue.Value.Relation.Contents = nil
- }
}
if nil == baseValue.Value {
@@ -408,6 +404,7 @@ func fillAttributeViewAutoGeneratedValues(attrView *av.AttributeView, collection
keyValues = append(keyValues, &av.KeyValues{Key: rollupKey, Values: []*av.Value{{ID: value.ID, KeyID: rollupKey.ID, BlockID: itemID, Type: av.KeyTypeRollup, Rollup: value.Rollup}}})
items[itemID] = keyValues
case av.KeyTypeRelation: // 渲染关联字段
+ value.Relation.Contents = nil
relKey, _ := attrView.GetKey(value.KeyID)
if nil != relKey && nil != relKey.Relation {
destAv := avCache[relKey.Relation.AvID]