Skip to content

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

:bug: Update av Fix https://github.com/siyuan-note/siyuan/issues/9380

Daniel0ed68847618c
diff --git a/kernel/av/table.go b/kernel/av/table.go
index d20a6b97f4..e9d69107a6 100644
--- a/kernel/av/table.go
+++ b/kernel/av/table.go
@@ -804,8 +804,10 @@ func (table *Table) calcColSelect(col *TableColumn, colIndex int) {
uniqueValues := map[string]bool{}
for _, row := range table.Rows {
if nil != row.Cells[colIndex] && nil != row.Cells[colIndex].Value && nil != row.Cells[colIndex].Value.MSelect && 0 < len(row.Cells[colIndex].Value.MSelect) && nil != row.Cells[colIndex].Value.MSelect[0] && "" != row.Cells[colIndex].Value.MSelect[0].Content {
- uniqueValues[row.Cells[colIndex].Value.MSelect[0].Content] = true
- countUniqueValues++
+ if _, ok := uniqueValues[row.Cells[colIndex].Value.MSelect[0].Content]; !ok {
+ uniqueValues[row.Cells[colIndex].Value.MSelect[0].Content] = true
+ countUniqueValues++
+ }
}
}
col.Calc.Result = &Value{Number: NewFormattedValueNumber(float64(countUniqueValues), NumberFormatNone)}