Skip to content

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

:art: Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958

Daniel0a5f0cd9e93c
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 51a6d84fb1..2e850be816 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -786,7 +786,11 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View) (ret *a
}
for _, blockID := range relVal.Relation.BlockIDs {
- cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destAv.GetValue(rollupKey.Rollup.KeyID, blockID).String())
+ destVal := destAv.GetValue(rollupKey.Rollup.KeyID, blockID)
+ if nil == destVal {
+ continue
+ }
+ cell.Value.Rollup.Contents = append(cell.Value.Rollup.Contents, destVal.String())
}
case av.KeyTypeRelation: // 渲染关联列
relKey, _ := attrView.GetKey(cell.Value.KeyID)