mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user