Commit ecd2e6f4 authored by Rafael Monnerat's avatar Rafael Monnerat

Improve query (Minor performance improvement)

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