🎨 Update av

This commit is contained in:
Daniel 2023-07-31 21:16:25 +08:00
parent a92aecfe8c
commit 6df3017857
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -386,14 +386,13 @@ func setAttributeViewColumnCalc(operation *Operation) (err error) {
}
func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr) {
firstSrcID := operation.SrcIDs[0]
tree, err := tx.loadTree(firstSrcID)
if nil != err {
logging.LogErrorf("load tree [%s] failed: %s", firstSrcID, err)
return &TxErr{code: TxErrCodeBlockNotFound, id: firstSrcID, msg: err.Error()}
}
for _, id := range operation.SrcIDs {
tree, err := tx.loadTree(id)
if nil != err {
logging.LogErrorf("load tree [%s] failed: %s", id, err)
return &TxErr{code: TxErrCodeBlockNotFound, id: id, msg: err.Error()}
}
var avErr error
if avErr = addAttributeViewBlock(id, operation, tree, tx); nil != avErr {
return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: avErr.Error()}