diff --git a/kernel/model/attribute_view.go b/kernel/model/attribute_view.go index 7d8ef3413..e00a29e49 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 }) } }