Commit c1578df2 authored by Yusei Tahara's avatar Yusei Tahara

A little performance improvement. Stop to get all person documents.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18047 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0ff5a7fc
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -78,8 +75,7 @@ ...@@ -78,8 +75,7 @@
persons_to_inform = []\n persons_to_inform = []\n
\n \n
# find which persons have needed roles so they can be informed\n # find which persons have needed roles so they can be informed\n
person_list = context.getPortalObject().portal_catalog(portal_type = \'Person\')\n person_list = context.getPortalObject().portal_catalog(portal_type = \'Person\', reference=\'%\')\n
person_list = filter(lambda x: x.getReference() is not None, person_list)\n
for person in person_list:\n for person in person_list:\n
local_roles = context.Document_getPersonRoleList(person, context)\n local_roles = context.Document_getPersonRoleList(person, context)\n
# check if person\'s roles in this document\'s context allow him/her to modify it\n # check if person\'s roles in this document\'s context allow him/her to modify it\n
...@@ -173,7 +169,6 @@ for person in persons_to_inform:\n ...@@ -173,7 +169,6 @@ for person in persons_to_inform:\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>person_list</string> <string>person_list</string>
<string>filter</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>person</string> <string>person</string>
<string>local_roles</string> <string>local_roles</string>
......
729 730
\ 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