From da78a1107d7f775de825f5b8c78ccbfeac3d6481 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Sat, 30 Nov 2024 17:49:29 +0100 Subject: [PATCH] Fix validation error in non-aggregate aggregate #5830 --- src/ifcopenshell-python/ifcopenshell/validate.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/ifcopenshell/validate.py b/src/ifcopenshell-python/ifcopenshell/validate.py index 1caf969f42..4632e090c9 100644 --- a/src/ifcopenshell-python/ifcopenshell/validate.py +++ b/src/ifcopenshell-python/ifcopenshell/validate.py @@ -243,7 +243,7 @@ def assert_valid( elif isinstance(attr_type, aggregation_type): b1, b2 = attr_type.bound1(), attr_type.bound2() ty = attr_type.type_of_element() - invalid = ( + invalid = type(val) != tuple or ( len(val) < b1 or (b2 != -1 and len(val) > b2) or not all(assert_valid(ty, v, schema, attr=attr) for v in val)