mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +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()
|
type = type.declared_type()
|
||||||
|
|
||||||
if isinstance(value, (list, tuple)):
|
if isinstance(value, (list, tuple)):
|
||||||
assert isinstance(type, ifcopenshell.ifcopenshell_wrapper.aggregation_type)
|
if isinstance(type, ifcopenshell.ifcopenshell_wrapper.aggregation_type):
|
||||||
ty = type.type_of_element()
|
ty = type.type_of_element()
|
||||||
for v in value:
|
for v in value:
|
||||||
check(v, ty, instance=inst)
|
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):
|
elif isinstance(value, ifcopenshell.entity_instance):
|
||||||
if isinstance(
|
if isinstance(
|
||||||
S.declaration_by_name(value.is_a()),
|
S.declaration_by_name(value.is_a()),
|
||||||
|
|||||||
Reference in New Issue
Block a user