From 957893f6490a97efc10da92abdcdae44cb176e12 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Fri, 2 Nov 2007 17:28:58 +0000
Subject: [PATCH] Move a constant assert outside of "for" loop.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17374 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/WorkflowTool.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/product/ERP5Type/patches/WorkflowTool.py b/product/ERP5Type/patches/WorkflowTool.py
index 0d6a4f2dfc..2e00f67c61 100644
--- a/product/ERP5Type/patches/WorkflowTool.py
+++ b/product/ERP5Type/patches/WorkflowTool.py
@@ -553,6 +553,7 @@ def WorkflowTool_refreshWorklistCache(self):
       groupWorklistListByCondition(
         worklist_dict=worklist_dict,
         acceptable_key_dict=acceptable_key_dict)
+    assert COUNT_COLUMN_TITLE in table_column_id_set
     for grouped_worklist_dict in worklist_list_grouped_by_condition:
       # Generate the query for this worklist_list
       (total_criterion_id_list, query) = \
@@ -565,7 +566,6 @@ def WorkflowTool_refreshWorklistCache(self):
         total_criterion_id_list.append(security_column_id)
       group_by_expression = ', '.join(total_criterion_id_list)
       assert COUNT_COLUMN_TITLE not in total_criterion_id_list
-      assert COUNT_COLUMN_TITLE in table_column_id_set
       select_expression = 'count(*) as %s, %s' % (COUNT_COLUMN_TITLE,
                                                   group_by_expression)
       search_result_kw = {'select_expression': select_expression,
-- 
2.30.9