not ok option to alert list, fixes: #9754

This commit is contained in:
Patrick O'Carroll
2017-11-13 10:30:11 +01:00
parent c44f6e2ec2
commit 9ad186bcc9
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -94,7 +94,12 @@ func HandleAlertsQuery(query *m.GetAlertsQuery) error {
if i > 0 {
sql.WriteString(" OR ")
}
sql.WriteString("state = ? ")
if strings.HasPrefix(v, "not") {
sql.WriteString("state <> ? ")
v = v[4:]
} else {
sql.WriteString("state = ? ")
}
params = append(params, v)
}
sql.WriteString(")")