Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: fix tag filter

johnnyjoy8e586d348ea8
diff --git a/store/db/sqlite/memo_filter.go b/store/db/sqlite/memo_filter.go
index 00e83911a..f77f3475a 100644
--- a/store/db/sqlite/memo_filter.go
+++ b/store/db/sqlite/memo_filter.go
@@ -97,7 +97,7 @@ func RestoreExprToSQL(expr *exprv1.Expr) (string, error) {
if identifier == "tag" {
subcodition := []string{}
for _, v := range values {
- subcodition = append(subcodition, fmt.Sprintf("JSON_EXTRACT(`memo`.`payload`, '$.tags') LIKE %s", fmt.Sprintf(`%%"%s"%%`, v)))
+ subcodition = append(subcodition, fmt.Sprintf("JSON_EXTRACT(`memo`.`payload`, '$.tags') LIKE %s", fmt.Sprintf(`'%%"%s"%%'`, v)))
}
if len(subcodition) == 1 {
condition = subcodition[0]