From 239a1434e10fa1b492f39335160f2cb9c8a04665 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sat, 27 Apr 2024 22:09:48 +0800 Subject: [PATCH] :art: Data History - File history - Assets search results and operation conditions do not match https://github.com/siyuan-note/siyuan/issues/11171 --- kernel/model/history.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/history.go b/kernel/model/history.go index 7ca196210..07e036163 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'" }