Commit bdd0b6d3 authored by kaiyou's avatar kaiyou

Handle the case of empty filters for notificiations

parent 371080a7
Pipeline #147 passed with stage
in 51 seconds
...@@ -21,6 +21,8 @@ def filter_match(candidate, filters): ...@@ -21,6 +21,8 @@ def filter_match(candidate, filters):
""" Apply a list of filters to a candidate dictionary """ Apply a list of filters to a candidate dictionary
""" """
if type(filters) is list: if type(filters) is list:
if len(filters) == 0:
return True
return any(filter_match(candidate, subfilters) return any(filter_match(candidate, subfilters)
for subfilters in filters) for subfilters in filters)
elif type(filters) is dict: elif type(filters) is dict:
......
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