Commit c867f48f authored by kaiyou's avatar kaiyou

Handle non dict candidates when applying filters

parent a7aa987f
Pipeline #152 passed with stage
in 59 seconds
......@@ -29,7 +29,7 @@ def filter_match(candidate, filters):
return True
return any(filter_match(candidate, subfilters)
for subfilters in filters)
elif type(filters) is dict:
elif type(filters) is dict and type(candidate) is dict:
return all(filter_match(candidate.get(key, None), value)
for key, value in filters.items())
else:
......
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