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):
|
def apply(self, db, person):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
#def __nonzero__(self, db, person):
|
__nonzero__ = apply
|
||||||
# return self.apply(db, person)
|
|
||||||
|
|
||||||
def display_values(self):
|
def display_values(self):
|
||||||
v = ( '%s="%s"' % ((_(self.labels[ix]),)*2)
|
v = ( '%s="%s"' % ((_(self.labels[ix]),)*2)
|
||||||
|
Loading…
Reference in New Issue
Block a user