From 0a5f0cd9e93c2c7cad7caa0e1a21c36b3d2346bb Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 29 Dec 2023 11:26:05 +0800 Subject: [PATCH] :art: Add Rollup column to database table view https://github.com/siyuan-note/siyuan/issues/9958 --- kernel/model/attribute_view.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 51a6d84fb..2e850be81 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)