Fix #4492. Refix bug where there was an extra equal sign when loading saved queries.

This commit is contained in:
Dion Moult
2024-04-06 21:42:49 +11:00
parent 0f33c000fb
commit acba7c2410
+2 -4
View File
@@ -154,7 +154,7 @@ class ImportFilterQueryTransformer(lark.Transformer):
if "pset" in arg:
new2.pset = arg["pset"]
if "comparison" in arg:
new2.comparison = arg["comparison"]
new2.comparison = arg["comparison"] or "="
def facet(self, args):
return args[0]
@@ -196,8 +196,6 @@ class ImportFilterQueryTransformer(lark.Transformer):
def query(self, args):
keys, comparison, value = args
if comparison == "=":
comparison = ""
return {"type": "query", "name": keys, "value": f"{comparison}{value}"}
def comparison(self, args):
@@ -211,7 +209,7 @@ class ImportFilterQueryTransformer(lark.Transformer):
return (
is_not
+ {
"equals": "=",
"equals": "", # Blank because it's the default situation
"morethanequalto": ">=",
"lessthanequalto": "<=",
"morethan": ">",