This commit is contained in:
Liang Ding 2023-03-03 09:46:10 +08:00
parent 680ff25ce4
commit 7b97c5d41a
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -32,13 +32,13 @@ func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr)
tree, err := tx.loadTree(firstSrcID) tree, err := tx.loadTree(firstSrcID)
if nil != err { if nil != err {
logging.LogErrorf("load tree [%s] failed: %s", firstSrcID, err) logging.LogErrorf("load tree [%s] failed: %s", firstSrcID, err)
return &TxErr{code: TxErrCodeBlockNotFound, id: firstSrcID} return &TxErr{code: TxErrCodeBlockNotFound, id: firstSrcID, msg: err.Error()}
} }
avID := operation.ParentID avID := operation.ParentID
for _, id := range operation.SrcIDs { for _, id := range operation.SrcIDs {
if err = addAttributeViewBlock(id, avID, tree); nil != err { if err = addAttributeViewBlock(id, avID, tree); nil != err {
return &TxErr{code: TxErrWriteAttributeView, id: avID} return &TxErr{code: TxErrWriteAttributeView, id: avID, msg: err.Error()}
} }
} }
return return
@ -59,8 +59,6 @@ func (tx *Transaction) doRemoveAttrViewBlock(operation *Operation) (ret *TxErr)
} }
} }
return return
return
} }
func AddAttributeViewColumn(name string, typ string, columnIndex int, avID string) (err error) { func AddAttributeViewColumn(name string, typ string, columnIndex int, avID string) (err error) {