mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Clean code
This commit is contained in:
parent
46402dd709
commit
25a75982c9
3 changed files with 59 additions and 58 deletions
|
|
@ -398,7 +398,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
|||
keyValues = append(keyValues, kValues)
|
||||
} else {
|
||||
// 如果没有值,那么就补一个默认值
|
||||
kValues.Values = append(kValues.Values, treenode.GetAttributeViewDefaultValue(ast.NewNodeID(), kv.Key.ID, blockID, kv.Key.Type))
|
||||
kValues.Values = append(kValues.Values, av.GetAttributeViewDefaultValue(ast.NewNodeID(), kv.Key.ID, blockID, kv.Key.Type))
|
||||
keyValues = append(keyValues, kValues)
|
||||
}
|
||||
}
|
||||
|
|
@ -426,7 +426,7 @@ func GetBlockAttributeViewKeys(blockID string) (ret []*BlockAttributeViewKeys) {
|
|||
destVal := destAv.GetValue(kv.Key.Rollup.KeyID, bID)
|
||||
if nil == destVal {
|
||||
if destAv.ExistBlock(bID) { // 数据库中存在行但是列值不存在是数据未初始化,这里补一个默认值
|
||||
destVal = treenode.GetAttributeViewDefaultValue(ast.NewNodeID(), kv.Key.Rollup.KeyID, bID, destKey.Type)
|
||||
destVal = av.GetAttributeViewDefaultValue(ast.NewNodeID(), kv.Key.Rollup.KeyID, bID, destKey.Type)
|
||||
}
|
||||
if nil == destVal {
|
||||
continue
|
||||
|
|
@ -1118,7 +1118,7 @@ func renderAttributeViewTable(attrView *av.AttributeView, view *av.View, query s
|
|||
destVal := destAv.GetValue(rollupKey.Rollup.KeyID, blockID)
|
||||
if nil == destVal {
|
||||
if destAv.ExistBlock(blockID) { // 数据库中存在行但是列值不存在是数据未初始化,这里补一个默认值
|
||||
destVal = treenode.GetAttributeViewDefaultValue(ast.NewNodeID(), rollupKey.Rollup.KeyID, blockID, destKey.Type)
|
||||
destVal = av.GetAttributeViewDefaultValue(ast.NewNodeID(), rollupKey.Rollup.KeyID, blockID, destKey.Type)
|
||||
}
|
||||
if nil == destVal {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue