🎨 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:
Daniel 2024-07-24 09:55:08 +08:00
parent 3f8f89b941
commit f622b42f36
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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,