浏览代码

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

Daniel 1 年之前
父节点
当前提交
89a413c8bd
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      kernel/treenode/node.go

+ 5 - 1
kernel/treenode/node.go

@@ -745,7 +745,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)