fix bug by checking if data value is a dict
This commit is contained in:
@@ -157,7 +157,7 @@ def get_value(data, element):
|
||||
keys = element.split('/')
|
||||
for key in keys:
|
||||
data = data.get(key)
|
||||
if data and len(data) == 1:
|
||||
if isinstance(data, dict) and data and len(data) == 1:
|
||||
data = next(iter(data.values()))
|
||||
return data
|
||||
|
||||
|
||||
Reference in New Issue
Block a user