🎨 The database-bound block is automatically added to the database after being copied as a replica https://github.com/siyuan-note/siyuan/issues/11959
This commit is contained in:
parent
1645099945
commit
935efd7d3d
1 changed files with 10 additions and 0 deletions
|
@ -1036,6 +1036,16 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
|
|||
|
||||
upsertAvBlockRel(insertedNode)
|
||||
|
||||
// 复制为副本时将该副本块插入到数据库中 https://github.com/siyuan-note/siyuan/issues/11959
|
||||
avs := insertedNode.IALAttr(av.NodeAttrNameAvs)
|
||||
for _, avID := range strings.Split(avs, ",") {
|
||||
AddAttributeViewBlock(tx, []map[string]interface{}{{
|
||||
"id": insertedNode.ID,
|
||||
"isDetached": false,
|
||||
}}, avID, "", previousID, false)
|
||||
util.PushReloadAttrView(avID)
|
||||
}
|
||||
|
||||
operation.ID = insertedNode.ID
|
||||
operation.ParentID = insertedNode.Parent.ID
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue