03172: Error editing event filter

svn: r13066
This commit is contained in:
Benny Malengier 2009-08-18 20:18:10 +00:00
parent 27fbd80a05
commit a111d627eb
3 changed files with 2 additions and 4 deletions

View File

@ -204,7 +204,7 @@ class EditFilter(ManagedWindow.ManagedWindow):
pass
def update_rule(self, old_rule, new_rule):
if old_rule:
if old_rule is not None:
self.filter.delete_rule(old_rule)
self.filter.add_rule(new_rule)
self.draw_rules()

View File

@ -516,7 +516,7 @@ class EditRule(ManagedWindow.ManagedWindow):
# If editing a rule, get the name so that we can select it later
#
sel_node = None
if self.active_rule:
if self.active_rule is not None:
self.sel_class = self.active_rule.__class__
else:
self.sel_class = None

View File

@ -69,8 +69,6 @@ class Rule(object):
def apply(self, db, person):
return True
__nonzero__ = apply
def display_values(self):
v = ( '%s="%s"' % ((_(self.labels[ix]),)*2)
for ix in xrange(len(self.list)) if self.list[ix] )