Commit 871e06fd authored by Vincent Pelletier's avatar Vincent Pelletier

Woops, unrestrictedTraverse emits a KeyError when object is not found, not an AttributeError...


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24108 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0b83d542
...@@ -253,7 +253,7 @@ class Message: ...@@ -253,7 +253,7 @@ class Message:
# XXX: There is no check to see if user is allowed to access # XXX: There is no check to see if user is allowed to access
# that method ! # that method !
method = obj.unrestrictedTraverse(self.method_id) method = obj.unrestrictedTraverse(self.method_id)
except AttributeError: except KeyError:
method = None method = None
self.setExecutionState(MESSAGE_NOT_EXECUTABLE, context=activity_tool) self.setExecutionState(MESSAGE_NOT_EXECUTABLE, context=activity_tool)
else: else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment