Fix Filters.regex failing in case the value is None

This commit is contained in:
Dan 2020-05-16 14:40:22 +02:00
parent 22eb42e1f3
commit 5b94c340c0

View File

@ -323,7 +323,8 @@ class Filters:
else: else:
raise ValueError("Regex filter doesn't work with {}".format(type(update))) raise ValueError("Regex filter doesn't work with {}".format(type(update)))
update.matches = list(flt.p.finditer(value)) or None if value:
update.matches = list(flt.p.finditer(value)) or None
return bool(update.matches) return bool(update.matches)