Skip to content

Commit 4cb111a

Browse files
authored
Don't fail validation on entity rule branches with different binding
1 parent 5814798 commit 4cb111a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mvd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@ def translate(v):
469469
return getattr(operator, v.lower() + "_")
470470
else:
471471
if v.b == "Value":
472-
return d[v.a] == parse_mvdxml_token(v.c)
472+
return d.get(v.a) == parse_mvdxml_token(v.c)
473473
elif v.b == "Type":
474-
return d[v.a].is_a(parse_mvdxml_token(v.c))
474+
return d.get(v.a) and d.get(v.a).is_a(parse_mvdxml_token(v.c))
475475

476476
r2 = list(map(translate, r))
477477
yield reduce(operation_reduce, r2)

0 commit comments

Comments
 (0)