ifcopenshell.util.element.get_type to be less strict again after d443c5e

I guess by accident in d443c5e I've made this method too strict and it broke get_references using it for IfcPropertySets. Maybe it's a good idea to make it more strict in the future, for now just restoring the previous behaviour.
This commit is contained in:
Andrej730
2024-11-06 16:03:44 +05:00
parent e70bc04915
commit 36bd89bb40
2 changed files with 4 additions and 4 deletions
@@ -27,7 +27,7 @@ def get_references(element: ifcopenshell.entity_instance, should_inherit=True) -
references := getattr(element, "HasExternalReference", None)
) is not None:
return {r.RelatingReference for r in references}
if should_inherit:
if should_inherit and element.is_a("IfcObject"):
element_type = ifcopenshell.util.element.get_type(element)
if element_type and element_type != element:
results = get_references(element_type)