diff --git a/src/ifcopenshell-python/ifcopenshell/express/rule_executor.py b/src/ifcopenshell-python/ifcopenshell/express/rule_executor.py index e9b66a56fb..9ba2a592e8 100644 --- a/src/ifcopenshell-python/ifcopenshell/express/rule_executor.py +++ b/src/ifcopenshell-python/ifcopenshell/express/rule_executor.py @@ -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()),