From c4347042a818db2b932435761d64834eec7f450c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C5=81ukasz=20Nowak?= <luke@nexedi.com>
Date: Tue, 7 Jul 2009 07:33:22 +0000
Subject: [PATCH]  - validate rules conditionally, as right now workflow method
 is raising errors

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27978 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/tests/ERP5TypeTestCase.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/product/ERP5Type/tests/ERP5TypeTestCase.py b/product/ERP5Type/tests/ERP5TypeTestCase.py
index 7fd14ef275..cfdbb1b16c 100644
--- a/product/ERP5Type/tests/ERP5TypeTestCase.py
+++ b/product/ERP5Type/tests/ERP5TypeTestCase.py
@@ -558,7 +558,8 @@ class ERP5TypeTestCase(PortalTestCase):
       rule_tool = self.getRuleTool()
       for rule in rule_tool.contentValues(
           portal_type=rule_tool.getPortalRuleTypeList()):
-        rule.validate()
+        if rule.getValidationState() != 'validated':
+          rule.validate()
 
     def tic(self):
       """
-- 
2.30.9