Skip to content

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

:art: Data History - File history - Assets search results and operation conditions do not match https://github.com/siyuan-note/siyuan/issues/11171

Daniel239a1434e10f
diff --git a/kernel/model/history.go b/kernel/model/history.go
index 7ca1962101..07e0361637 100644
--- a/kernel/model/history.go
+++ b/kernel/model/history.go
@@ -404,11 +404,11 @@ func buildSearchHistoryQueryFilter(query, op, box, table string, typ int) (stmt
} else {
stmt += "1=1"
}
+ if "all" != op {
+ stmt += " AND op = '" + op + "'"
+ }
if HistoryTypeDocName == typ || HistoryTypeDoc == typ || HistoryTypeDocID == typ {
- if "all" != op {
- stmt += " AND op = '" + op + "'"
- }
if HistoryTypeDocName == typ || HistoryTypeDoc == typ {
stmt += " AND path LIKE '%/" + box + "/%' AND path LIKE '%.sy'"
}