Skip to content

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

:art: Update av

Danielb6f62eb4ea1d
diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go
index 7d8ef3413c..e00a29e490 100644
--- a/kernel/model/attribute_view.go
+++ b/kernel/model/attribute_view.go
@@ -94,7 +94,6 @@ func sortRows(ret *av.AttributeView) {
}
sort.Slice(ret.Rows, func(i, j int) bool {
- less := false
for _, index := range colIndexes {
c := ret.Columns[index]
if c.Type == av.ColumnTypeBlock {
@@ -104,11 +103,13 @@ func sortRows(ret *av.AttributeView) {
result := ret.Rows[i].Cells[index].Value.Compare(ret.Rows[j].Cells[index].Value)
if 0 == result {
continue
- } else if 0 > result {
- less = true
+ }
+
+ if 0 > result {
+ return true
}
}
- return less
+ return false
})
}
}