Browse Source

:bug: Incorrect reference count after moving doc across notebooks https://github.com/siyuan-note/siyuan/issues/10622

Daniel 1 year ago
parent
commit
04b61dc7eb
1 changed files with 3 additions and 1 deletions
  1. 3 1
      kernel/model/box.go

+ 3 - 1
kernel/model/box.go

@@ -393,7 +393,9 @@ func moveTree(tree *parse.Tree) {
 		tree.Root.RemoveIALAttr("custom-hidden")
 		filesys.WriteTree(tree)
 	}
-	sql.UpsertTreeQueue(tree)
+
+	sql.RemoveTreeQueue(tree.ID)
+	sql.IndexTreeQueue(tree)
 
 	box := Conf.Box(tree.Box)
 	box.renameSubTrees(tree)