mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
#2082 You can now filter by metadata existence in the selector syntax
This commit is contained in:
@@ -192,7 +192,9 @@ class Selector:
|
||||
element_value = cls.get_element_value(element, key)
|
||||
if element_value is None and value is not None:
|
||||
continue
|
||||
if not comparison or cls.filter_element(element, element_value, comparison, value):
|
||||
if comparison and cls.filter_element(element, element_value, comparison, value):
|
||||
results.append(element)
|
||||
elif not comparison and element_value:
|
||||
results.append(element)
|
||||
return results
|
||||
|
||||
|
||||
Reference in New Issue
Block a user