Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Rows non-bound in the database support `Add to Database` https://github.com/siyuan-note/siyuan/issues/11093

Daniel462d38e4e702
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 2c3902cc2e..ea944812e2 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -2193,7 +2193,7 @@ func AddAttributeViewBlock(tx *Transaction, srcs []map[string]interface{}, avID,
tree, loadErr = LoadTreeByBlockID(srcID)
}
if nil != loadErr {
- logging.LogErrorf("load tree [%s] failed: %s", srcID, err)
+ logging.LogErrorf("load tree [%s] failed: %s", srcID, loadErr)
return loadErr
}
}
@@ -3166,12 +3166,12 @@ func UpdateAttributeViewCell(tx *Transaction, avID, keyID, rowID, cellID string,
// 将游离行绑定到新建的块上
bindBlockAv(tx, avID, rowID)
}
- } else { // 之前绑定了块
+ } else { // 之前绑定了块
if isUpdatingBlockKey { // 正在更新主键
if val.IsDetached { // 现在是游离行
// 将绑定的块从属性视图中移除
unbindBlockAv(tx, avID, rowID)
- } else { // 现在绑定了块
+ } else { // 现在绑定了块
if oldBoundBlockID != val.BlockID { // 之前绑定的块和现在绑定的块不一样
// 换绑块
unbindBlockAv(tx, avID, oldBoundBlockID)