Skip to content

Commit

Permalink
rules: fix is_active function
Browse files Browse the repository at this point in the history
  • Loading branch information
regit committed Mar 12, 2018
1 parent d753e7e commit 88f31fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,8 @@ def parse_flowbits(self, source, flowbits, addition = False):
flowbits['added']['through_set'].append(through_elt)

def is_active(self, ruleset):
SUPPRESSED = Transformation.SUPPRESSED
S_SUPPRESSED = Transformation.S_SUPPRESSED
if self.state and self.category in ruleset.categories.all() and self not in ruleset.get_transformed_rules(key=SUPPRESSED, value=S_SUPPRESSED):
return True
return False
Expand Down

0 comments on commit 88f31fe

Please sign in to comment.