From acba7c24108889a019a48d3f77f4951b98bb2e20 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sat, 6 Apr 2024 21:42:49 +1100 Subject: [PATCH] Fix #4492. Refix bug where there was an extra equal sign when loading saved queries. --- src/blenderbim/blenderbim/tool/search.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/blenderbim/blenderbim/tool/search.py b/src/blenderbim/blenderbim/tool/search.py index e666158720..55387c16fc 100644 --- a/src/blenderbim/blenderbim/tool/search.py +++ b/src/blenderbim/blenderbim/tool/search.py @@ -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": ">",