Check hash of message when determining if it is a new match
This commit is contained in:
@@ -203,7 +203,8 @@ class NotificationRule(models.Model):
|
||||
Get the total number of matches for this rule.
|
||||
"""
|
||||
if isinstance(self.match, dict):
|
||||
return f"{sum(list(self.match.values()))}/{len(self.match)}"
|
||||
truthy_values = [x for x in self.match.values() if x is not False]
|
||||
return f"{len(truthy_values)}/{len(self.match)}"
|
||||
|
||||
def get_notification_settings(self, check=True):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user