Commit 78d78591 authored by Gabriel Monnerat's avatar Gabriel Monnerat

refactor the code to not call twice getFollowUpList

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44522 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3f5cde9a
...@@ -57,14 +57,15 @@ if not person:\n ...@@ -57,14 +57,15 @@ if not person:\n
return None\n return None\n
\n \n
result_list = portal.portal_catalog(reference=reference, limit=1)\n result_list = portal.portal_catalog(reference=reference, limit=1)\n
webpage = result_list[0].getObject()\n web_page = result_list[0].getObject()\n
\n \n
if person.getRelativeUrl() not in webpage.getFollowUpList():\n follow_up_list = web_page.getFollowUpList()\n
value_list = webpage.getFollowUpValueList()\n if person.getRelativeUrl() not in follow_up_list:\n
value_list = follow_up_list\n
value_list.append(person)\n value_list.append(person)\n
webpage.setFollowUpValueList(value_list)\n web_page.setFollowUpValueList(value_list)\n
\n \n
return webpage\n return web_page\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
310 311
\ 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