An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: Fix sort av view not working
Danielcc9aed6aecb3
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.goindex 820030f99f..7d2364b00a 100644--- a/kernel/model/attribute_view.go+++ b/kernel/model/attribute_view.go@@ -1376,15 +1376,14 @@ func (tx *Transaction) doSortAttrViewView(operation *Operation) (ret *TxErr) {return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: err.Error()}}- view, err := getAttrViewViewByBlockID(attrView, operation.BlockID)+ view := attrView.GetView(operation.ID)if nil == view {logging.LogErrorf("get view failed: %s", operation.BlockID)return &TxErr{code: TxErrWriteAttributeView, id: operation.AvID, msg: err.Error()}}viewID := view.ID- previewViewID := operation.PreviousID-- if viewID == previewViewID {+ previousViewID := operation.PreviousID+ if viewID == previousViewID {return}@@ -1402,7 +1401,7 @@ func (tx *Transaction) doSortAttrViewView(operation *Operation) (ret *TxErr) {attrView.Views = append(attrView.Views[:index], attrView.Views[index+1:]...)for i, v := range attrView.Views {- if v.ID == previewViewID {+ if v.ID == previousViewID {previousIndex = i + 1break}