Skip to content

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

:bug: Database relative date filtering is incorrect https://github.com/siyuan-note/siyuan/issues/15710

Daniel0f087bf1e4f1
diff --git a/kernel/av/filter.go b/kernel/av/filter.go
index 608139735a..7445cd5460 100644
--- a/kernel/av/filter.go
+++ b/kernel/av/filter.go
@@ -285,10 +285,8 @@ func (value *Value) filter(other *Value, relativeDate, relativeDate2 *RelativeDa
}
}
case KeyTypeDate:
- if nil != value.Date && nil != other && nil != other.Date {
- if !other.Date.IsNotEmpty {
- return true
- }
+ if nil != value.Date && nil != other && nil != other.Date && nil == relativeDate && !other.Date.IsNotEmpty {
+ return true
}
if nil != value.Date {