Skip to content

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

:art: The database-bound block is automatically added to the database after being copied as a replica https://github.com/siyuan-note/siyuan/issues/11959

Danielf622b42f3613
diff --git a/kernel/model/transaction.go b/kernel/model/transaction.go
index cef6b50bac..4a24bc0088 100644
--- a/kernel/model/transaction.go
+++ b/kernel/model/transaction.go
@@ -1039,6 +1039,10 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
// 复制为副本时将该副本块插入到数据库中 https://github.com/siyuan-note/siyuan/issues/11959
avs := insertedNode.IALAttr(av.NodeAttrNameAvs)
for _, avID := range strings.Split(avs, ",") {
+ if !ast.IsNodeIDPattern(avID) {
+ continue
+ }
+
AddAttributeViewBlock(tx, []map[string]interface{}{{
"id": insertedNode.ID,
"isDetached": false,