mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 17:26:30 +00:00
Fix #4492. Refix bug where there was an extra equal sign when loading saved queries.
This commit is contained in:
@@ -154,7 +154,7 @@ class ImportFilterQueryTransformer(lark.Transformer):
|
|||||||
if "pset" in arg:
|
if "pset" in arg:
|
||||||
new2.pset = arg["pset"]
|
new2.pset = arg["pset"]
|
||||||
if "comparison" in arg:
|
if "comparison" in arg:
|
||||||
new2.comparison = arg["comparison"]
|
new2.comparison = arg["comparison"] or "="
|
||||||
|
|
||||||
def facet(self, args):
|
def facet(self, args):
|
||||||
return args[0]
|
return args[0]
|
||||||
@@ -196,8 +196,6 @@ class ImportFilterQueryTransformer(lark.Transformer):
|
|||||||
|
|
||||||
def query(self, args):
|
def query(self, args):
|
||||||
keys, comparison, value = args
|
keys, comparison, value = args
|
||||||
if comparison == "=":
|
|
||||||
comparison = ""
|
|
||||||
return {"type": "query", "name": keys, "value": f"{comparison}{value}"}
|
return {"type": "query", "name": keys, "value": f"{comparison}{value}"}
|
||||||
|
|
||||||
def comparison(self, args):
|
def comparison(self, args):
|
||||||
@@ -211,7 +209,7 @@ class ImportFilterQueryTransformer(lark.Transformer):
|
|||||||
return (
|
return (
|
||||||
is_not
|
is_not
|
||||||
+ {
|
+ {
|
||||||
"equals": "=",
|
"equals": "", # Blank because it's the default situation
|
||||||
"morethanequalto": ">=",
|
"morethanequalto": ">=",
|
||||||
"lessthanequalto": "<=",
|
"lessthanequalto": "<=",
|
||||||
"morethan": ">",
|
"morethan": ">",
|
||||||
|
|||||||
Reference in New Issue
Block a user