mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 22:22:26 +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}')
|
@step('The element {guid} is further defined as a {predefined_type}')
|
||||||
def step_impl(context, guid, predefined_type):
|
def step_impl(context, guid, predefined_type):
|
||||||
element = IfcFile.by_guid(guid)
|
element = IfcFile.by_guid(guid)
|
||||||
if (hasattr(element, 'PredefinedType') and element.PredefinedType == 'USERDEFINED') \
|
if hasattr(element, 'PredefinedType') \
|
||||||
or hasattr(element,'ObjectType'):
|
and element.PredefinedType == 'USERDEFINED' \
|
||||||
|
and hasattr(element,'ObjectType'):
|
||||||
assert_attribute(element, 'ObjectType', predefined_type)
|
assert_attribute(element, 'ObjectType', predefined_type)
|
||||||
elif hasattr(element, 'PredefinedType'):
|
elif hasattr(element, 'PredefinedType'):
|
||||||
assert_attribute(element, 'PredefinedType', predefined_type)
|
assert_attribute(element, 'PredefinedType', predefined_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user