Commit 58ccd33e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

we don't need to call test() because test() is already called in getFilteredActionListFor().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29647 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e2bc2abe
......@@ -499,14 +499,13 @@ class ERP5TypeInformation(XMLObject,
best_action = (), None
for action in self.getFilteredActionListFor(ob):
if action.getReference() == view:
if action.test(ec):
break
break
else:
# In case that "view" (or "list") action is not present or not allowed,
# find something that's allowed (of the same category, if possible).
index = (action.getActionType().endswith('_' + view),
-action.getFloatIndex())
if best_action[0] < index and action.test(ec):
if best_action[0] < index:
best_action = index, action
else:
action = best_action[1]
......
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