Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: Update av

Daniel6df30178576a
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index f0fb30408a..c0eeb642f5 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()}