From 768606571ee81607c7c3a3d39e26be87c40a6be0 Mon Sep 17 00:00:00 2001 From: ArturTomczak Date: Fri, 11 Jun 2021 19:03:03 +0200 Subject: [PATCH] fix multiple requirements at a time --- src/ifcopenshell-python/ifcopenshell/ids.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/ids.py b/src/ifcopenshell-python/ifcopenshell/ids.py index d78b51ee6e..f504b92e4c 100644 --- a/src/ifcopenshell-python/ifcopenshell/ids.py +++ b/src/ifcopenshell-python/ifcopenshell/ids.py @@ -213,7 +213,6 @@ class boolean_logic: self.terms = terms def __call__(self, *args): - #TODO only takes one requirement of a type, should take all eval = [t(*args) for t in self.terms] join = [" and ", " or "][self.fold == any] return facet_evaluation( @@ -285,8 +284,8 @@ class specification: def __init__(self, node): def parse_rules(node): - children = [node[n][0] for n in node] - names = [n for n in node] + names = [req for req in node for n in node[req]] + children = [child for req in node for child in node[req]] classes = map(meta_facet.facets.__getitem__, names) return [cls(n) for cls, n in zip(classes, children)]