Bail early when the attribute is not found, when expanding dot-notation

parent d5df7f15
......@@ -54,8 +54,9 @@ def _get_value(item, key):
value = attr
for part in parts[1:]:
if value is not _NOT_FOUND:
value = _get_value(value, part)
if value is _NOT_FOUND:
break
value = _get_value(value, part)
return value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment