From 8eaf0ea411c9fa6852888b0542bfe749692fe688 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 20 Apr 2024 12:22:28 +0800 Subject: [PATCH] :art: Rows non-bound in the database support `Add to Database` https://github.com/siyuan-note/siyuan/issues/11093 --- kernel/model/attribute_view.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index f9adb800f..2c3902cc2 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -2198,7 +2198,10 @@ func AddAttributeViewBlock(tx *Transaction, srcs []map[string]interface{}, avID, } } - srcContent := src["content"].(string) + var srcContent string + if nil != src["content"] { + srcContent = src["content"].(string) + } if avErr := addAttributeViewBlock(avID, blockID, previousBlockID, srcID, srcContent, isDetached, ignoreFillFilter, tree, tx); nil != avErr { return avErr }