Skip to content

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

:bug: Fix NPE https://github.com/siyuan-note/siyuan/issues/11805

Danieldd973963b586
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index f080dec3ce..25bfbfcd96 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -2835,7 +2835,7 @@ func replaceAttributeViewBlock(operation *Operation, tx *Transaction) (err error
// 检查是否已经存在绑定块,如果存在的话则重新绑定
for _, keyValues := range attrView.KeyValues {
for _, value := range keyValues.Values {
- if value.BlockID == operation.NextID {
+ if av.KeyTypeBlock == value.Type && nil != value.Block && value.BlockID == operation.NextID {
if !operation.IsDetached {
bindBlockAv0(tx, operation.AvID, node, tree)
value.IsDetached = false