From a5cefa369b5756be61e4aa098a5cd3a7fc35732e Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 27 Sep 2023 23:22:36 +0800 Subject: [PATCH] :art: New a row in the database no longer require to create a relevant doc https://github.com/siyuan-note/siyuan/issues/9294 --- 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 5de11b64f9d..629ccb55c32 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -444,7 +444,11 @@ func addAttributeViewBlock(blockID string, operation *Operation, tree *parse.Tre } } - value := &av.Value{ID: ast.NewNodeID(), KeyID: blockValues.Key.ID, BlockID: blockID, Type: av.KeyTypeBlock, IsDetached: operation.IsDetached, Block: &av.ValueBlock{ID: blockID, Content: getNodeRefText(node)}} + var content string + if !operation.IsDetached { + content = getNodeRefText(node) + } + value := &av.Value{ID: ast.NewNodeID(), KeyID: blockValues.Key.ID, BlockID: blockID, Type: av.KeyTypeBlock, IsDetached: operation.IsDetached, Block: &av.ValueBlock{ID: blockID, Content: content}} blockValues.Values = append(blockValues.Values, value) if !operation.IsDetached {