fixes incorrectly handled type error when list of objects is found in data #9876

This commit is contained in:
Abhimanyu Saharan 2023-05-13 02:31:40 +05:30
parent cdbb3827fe
commit ef765d3a57

View File

@ -69,7 +69,7 @@ class Condition:
if isinstance(obj, list): if isinstance(obj, list):
return [i.get(key) for i in obj] return [i.get(key) for i in obj]
return obj.get(key) return dict.get(obj, key)
try: try:
value = functools.reduce(_get, self.attr.split('.'), data) value = functools.reduce(_get, self.attr.split('.'), data)