mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
Fix bug where predefined types aren't audited correctly by BIMTester
This commit is contained in:
@@ -16,8 +16,9 @@ def step_impl(context, guid, ifc_class):
|
||||
@step('The element {guid} is further defined as a {predefined_type}')
|
||||
def step_impl(context, guid, predefined_type):
|
||||
element = IfcFile.by_guid(guid)
|
||||
if (hasattr(element, 'PredefinedType') and element.PredefinedType == 'USERDEFINED') \
|
||||
or hasattr(element,'ObjectType'):
|
||||
if hasattr(element, 'PredefinedType') \
|
||||
and element.PredefinedType == 'USERDEFINED' \
|
||||
and hasattr(element,'ObjectType'):
|
||||
assert_attribute(element, 'ObjectType', predefined_type)
|
||||
elif hasattr(element, 'PredefinedType'):
|
||||
assert_attribute(element, 'PredefinedType', predefined_type)
|
||||
|
||||
Reference in New Issue
Block a user