From 2033ee1c6911ed9e9394dd9cf39b02ba6161286e Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Sun, 8 Aug 2021 16:13:19 +1000 Subject: [PATCH] Minor fix --- src/ifcopenshell-python/ifcopenshell/util/element.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/element.py b/src/ifcopenshell-python/ifcopenshell/util/element.py index 1dfeac623b..743c6a102c 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/element.py +++ b/src/ifcopenshell-python/ifcopenshell/util/element.py @@ -73,7 +73,7 @@ def get_material(element, should_skip_usage=False): return relationship.RelatingMaterial.ForProfileSet return relationship.RelatingMaterial relating_type = get_type(element) - if hasattr(relating_type, "HasAssociations") and relating_type.HasAssociations: + if relating_type != element and hasattr(relating_type, "HasAssociations") and relating_type.HasAssociations: return get_material(relating_type, should_skip_usage)