From 58ccd33e461684a53ac052f816c26b6805fdfaa9 Mon Sep 17 00:00:00 2001
From: Kazuhiko Shiozaki <kazuhiko@nexedi.com>
Date: Wed, 14 Oct 2009 12:30:06 +0000
Subject: [PATCH] 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
---
 product/ERP5Type/ERP5Type.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/product/ERP5Type/ERP5Type.py b/product/ERP5Type/ERP5Type.py
index 611a45da91..78d56994a7 100644
--- a/product/ERP5Type/ERP5Type.py
+++ b/product/ERP5Type/ERP5Type.py
@@ -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]
-- 
2.30.9