mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Don't assert but just if-check for not terminating rule execution on very invalid files
This commit is contained in:
@@ -197,10 +197,14 @@ def run(f, logger):
|
||||
type = type.declared_type()
|
||||
|
||||
if isinstance(value, (list, tuple)):
|
||||
assert isinstance(type, ifcopenshell.ifcopenshell_wrapper.aggregation_type)
|
||||
ty = type.type_of_element()
|
||||
for v in value:
|
||||
check(v, ty, instance=inst)
|
||||
if isinstance(type, ifcopenshell.ifcopenshell_wrapper.aggregation_type):
|
||||
ty = type.type_of_element()
|
||||
for v in value:
|
||||
check(v, ty, instance=inst)
|
||||
else:
|
||||
# Let's hope a schema validation error was reported for this case
|
||||
pass
|
||||
|
||||
elif isinstance(value, ifcopenshell.entity_instance):
|
||||
if isinstance(
|
||||
S.declaration_by_name(value.is_a()),
|
||||
|
||||
Reference in New Issue
Block a user