Commit 8e586d34 authored by johnnyjoy's avatar johnnyjoy

chore: fix tag filter

parent bf5a2952
......@@ -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]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment