mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix bug where selector didn't handle "not equals" correctly for locations or groups
This commit is contained in:
@@ -660,7 +660,7 @@ class FacetTransformer(lark.Transformer):
|
||||
containers = self.get_container_tree(container)
|
||||
result = False if containers else None
|
||||
for container in containers:
|
||||
if self.compare(container.Name, comparison, value):
|
||||
if self.compare(container.Name, "=", value):
|
||||
result = True
|
||||
if result is not None:
|
||||
return result if comparison == "=" else not result
|
||||
@@ -675,7 +675,7 @@ class FacetTransformer(lark.Transformer):
|
||||
result = False
|
||||
for rel in getattr(element, "HasAssignments", []):
|
||||
if rel.is_a("IfcRelAssignsToGroup") and rel.RelatingGroup:
|
||||
if self.compare(rel.RelatingGroup.Name, comparison, value):
|
||||
if self.compare(rel.RelatingGroup.Name, "=", value):
|
||||
result = True
|
||||
return result if comparison == "=" else not result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user