Skip to content

Commit 0caf4dd

Browse files
committed
Fix case where key to array is None
1 parent ce4af49 commit 0caf4dd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

python-lib/dku_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def parse_keys_for_json(items):
4747
def get_value_from_path(dictionary, path, default=None, can_raise=True):
4848
ret = copy.deepcopy(dictionary)
4949
for key in path:
50-
if key in ret and isinstance(ret, dict):
50+
if isinstance(ret, dict) and (key in ret):
5151
ret = ret.get(key)
5252
else:
5353
error_message = "The extraction path {} was not found in the incoming data".format(path)

0 commit comments

Comments
 (0)