Fix Mongo query bug when using <> operator

This commit is contained in:
Zaid Abdulla committed 2022-07-15 11:36:15 -07:00
1 parent 6f29267266
commit ffbcf2bbc0
2 files changed
+20 -1

No files matched your search

+2 -1
View File
@@ -77,7 +77,8 @@ export function processDeviceFilter(filter: Expression): Expression {
if (typeof e[2] === "number") {
const alt = (e as any[]).slice();
alt[2] = new Date(e[2]);
e = ["OR", e, alt];
if (exp[0] === "<>" || exp[0] === "NOT LIKE") e = ["AND", e, alt];
else e = ["OR", e, alt];
}
return e;
}