diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index f0fb30408..c0eeb642f 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -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()}