From f4258c706d0bafa951633179e362209b0c07b3e4 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 18 Oct 2023 23:40:05 +0800 Subject: [PATCH 1/2] :art: Update database --- kernel/model/attribute_view.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 5d31981dc..a9fc72840 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -645,6 +645,12 @@ func setAttributeViewColumnCalc(operation *Operation) (err error) { func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr) { for _, id := range operation.SrcIDs { tree, err := tx.loadTree(id) + if nil == tree { + operation.IsDetached = true + } else { + operation.IsDetached = false + } + if nil != err && !operation.IsDetached { logging.LogErrorf("load tree [%s] failed: %s", id, err) return &TxErr{code: TxErrCodeBlockNotFound, id: id, msg: err.Error()} From 2b733a776ac106cc1df08dff2b57d2a06ae8364d Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Wed, 18 Oct 2023 23:52:06 +0800 Subject: [PATCH 2/2] :art: Update database --- kernel/model/attribute_view.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index a9fc72840..5d31981dc 100644 --- a/kernel/model/attribute_view.go +++ b/kernel/model/attribute_view.go @@ -645,12 +645,6 @@ func setAttributeViewColumnCalc(operation *Operation) (err error) { func (tx *Transaction) doInsertAttrViewBlock(operation *Operation) (ret *TxErr) { for _, id := range operation.SrcIDs { tree, err := tx.loadTree(id) - if nil == tree { - operation.IsDetached = true - } else { - operation.IsDetached = false - } - if nil != err && !operation.IsDetached { logging.LogErrorf("load tree [%s] failed: %s", id, err) return &TxErr{code: TxErrCodeBlockNotFound, id: id, msg: err.Error()}