Fix filters

To compare for "not equal" values you should invert the match, not directly compare with the string prepended with "!".
pull/161/head
Lucas Magalhães 2021-12-21 00:20:30 +00:00
parent 100948b4df
commit e852c477ad
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@ class LogItem():
def pass_filter(self):
for filter, filterValue in self.filters.items():
jsonValue = util.getFields(self.feed, filter)
if jsonValue is None or jsonValue != filterValue:
if jsonValue is None or ("!" not in filterValue and jsonValue != filterValue) or ("!" in filterValue and jsonValue == filterValue.strip("!")):
return False
return True