Commit ecd2e6f4 authored by Rafael Monnerat's avatar Rafael Monnerat

Improve query (Minor performance improvement)

parent f743bcbf
...@@ -55,9 +55,10 @@ ...@@ -55,9 +55,10 @@
The business configurations without Resource and with the state of the related workflow\n The business configurations without Resource and with the state of the related workflow\n
equals to \'End\' are just ignored.\n equals to \'End\' are just ignored.\n
"""\n """\n
bc_list = context.business_configuration_module.searchFolder(portal_type="Business Configuration")\n bc_list = list(context.business_configuration_module.searchFolder(\n
bc_list = [bc for bc in bc_list if bc.getResource() is not None and bc.getCurrentStateTitle() not in ("End",)]\n portal_type="Business Configuration",\n
\n simulation_state="draft", \n
resource = "%/workflow_module/%"))\n
bc_tuple_list = []\n bc_tuple_list = []\n
index = 0\n index = 0\n
while True:\n while True:\n
...@@ -66,7 +67,7 @@ while True:\n ...@@ -66,7 +67,7 @@ while True:\n
return bc_tuple_list\n return bc_tuple_list\n
else:\n else:\n
bc_tuple_list.append(tuple(part))\n bc_tuple_list.append(tuple(part))\n
index+=3\n index += 3\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
527 528
\ No newline at end of file \ No newline at end of file
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