Be fault tolerant when evaluating on_change

This commit is contained in:
C?dric Krier 2008-03-16 12:15:03 +01:00
parent db5dceb9af
commit 9e61bbf3bd

View file

@ -270,7 +270,10 @@ class ModelRecord(SignalEvent):
if isinstance(attr, basestring):
attr = eval(attr)
for arg in attr:
args[arg] = self.expr_eval(arg)
try:
args[arg] = self.expr_eval(arg)
except:
args[arg] = False
ids = self.id and [self.id] or []
try:
res = getattr(self.rpc, 'on_change_' + field)(ids, args,