Skip to content

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

:art: Improve av https://github.com/siyuan-note/siyuan/issues/15603

Daniel4210dad5b021
diff --git a/kernel/av/filter.go b/kernel/av/filter.go
index 1a689ceb85..40e68092f3 100644
--- a/kernel/av/filter.go
+++ b/kernel/av/filter.go
@@ -680,6 +680,9 @@ func filterTime(valueMills int64, valueIsNotEmpty bool, otherValueMills, otherVa
case FilterOperatorIsLessOrEqual:
return valueTime.Before(otherValueEnd) || valueTime.Equal(otherValueEnd)
case FilterOperatorIsBetween:
+ if 0 == otherValueMills || 0 == otherValueMills2 {
+ return true
+ }
otherValueTime2 := time.UnixMilli(otherValueMills2)
otherValueEnd2 := time.Date(otherValueTime2.Year(), otherValueTime2.Month(), otherValueTime2.Day(), 23, 59, 59, 999999999, otherValueTime2.Location())
return (valueTime.After(otherValueStart) || valueTime.Equal(otherValueStart)) && (valueTime.Before(otherValueEnd2) || valueTime.Equal(otherValueEnd2))