Add ability to use Rule in a boolean operation: "if Rule()" will be equivalent to "if Rule.apply()"
svn: r12845
This commit is contained in:
parent
a62b15353e
commit
7be4c7a2bf
@ -69,8 +69,7 @@ class Rule(object):
|
||||
def apply(self, db, person):
|
||||
return True
|
||||
|
||||
#def __nonzero__(self, db, person):
|
||||
# return self.apply(db, person)
|
||||
__nonzero__ = apply
|
||||
|
||||
def display_values(self):
|
||||
v = ( '%s="%s"' % ((_(self.labels[ix]),)*2)
|
||||
|
Loading…
Reference in New Issue
Block a user