Skip to content

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

:bug: Database rollup calculation range anomaly https://github.com/siyuan-note/siyuan/issues/10913

Danielca1be10f1783
diff --git a/kernel/av/value.go b/kernel/av/value.go
index 2a2793386b..0a2728d5c0 100644
--- a/kernel/av/value.go
+++ b/kernel/av/value.go
@@ -781,6 +781,10 @@ func (r *ValueRollup) RenderContents(calc *RollupCalc, destKey *Key) {
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(maxVal, destKey.NumberFormat)}}
}
case CalcOperatorRange:
+ if 2 > len(r.Contents) {
+ return
+ }
+
minVal := math.MaxFloat64
maxVal := -math.MaxFloat64
earliest := int64(0)