Skip to content
This repository has been archived by the owner on Jul 24, 2018. It is now read-only.

Commit

Permalink
Accept a rule_id to these functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Nov 16, 2015
1 parent 867ae3b commit bf2a6a0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fmn/lib/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,15 +368,15 @@ def fired(self, session):
if pref:
self.notify(pref.openid, pref.context_name, "filters")

def get_rule(self, session, code_path, **kw):
def get_rule(self, session, code_path, rule_id, **kw):
for r in self.rules:
if r.code_path == code_path:
if r.code_path == code_path and r.id == rule_id:
return r
raise ValueError("No such rule found: %r" % code_path)

def has_rule(self, session, code_path, **kw):
def has_rule(self, session, code_path, rule_id, **kw):
for r in self.rules:
if r.code_path == code_path:
if r.code_path == code_path and r.id == rule_id:
return True
return False

Expand Down

0 comments on commit bf2a6a0

Please sign in to comment.