This commit is contained in:
Daniel 2024-04-02 20:13:39 +08:00
parent 844fa8ef64
commit e12ed21c65
No known key found for this signature in database
GPG Key ID: 86211BA83DF03017

View File

@ -31,17 +31,16 @@ func (tx *Transaction) doMoveOutlineHeading(operation *Operation) (ret *TxErr) {
previousID := operation.PreviousID
parentID := operation.ParentID
if headingID == parentID || headingID == previousID {
return
}
tree, err := tx.loadTree(headingID)
if nil != err {
return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}
}
operation.RetData = tree.Root.ID
if headingID == parentID || headingID == previousID {
return
}
heading := treenode.GetNodeInTree(tree, headingID)
if nil == heading {
return &TxErr{code: TxErrCodeBlockNotFound, id: headingID}