Skip to content

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

:bug: Database unbind block causes entry to be deleted Fix https://github.com/siyuan-note/siyuan/issues/11101

Daniel1db8269b9fda
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index ad8d3d96d9..eefa76e4a1 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -1339,6 +1339,7 @@ func unbindAttributeViewBlock(operation *Operation, tx *Transaction) (err error)
unbindBlockAv(tx, operation.AvID, value.BlockID)
}
value.BlockID = operation.NextID
+ value.IsDetached = true
if nil != value.Block {
value.Block.ID = operation.NextID
}