mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Don't fail on empty ReferencedSource in IfcTester
This commit is contained in:
@@ -54,7 +54,7 @@ def get_references(element: ifcopenshell.entity_instance, should_inherit=True) -
|
||||
def get_classification(reference: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
|
||||
if reference.is_a("IfcClassification"):
|
||||
return reference
|
||||
return get_classification(reference.ReferencedSource)
|
||||
return get_classification(reference.ReferencedSource) if reference.ReferencedSource is not None else None
|
||||
|
||||
|
||||
def get_inherited_references(reference: Optional[ifcopenshell.entity_instance]) -> list[ifcopenshell.entity_instance]:
|
||||
|
||||
Reference in New Issue
Block a user