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
return None\n
\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
if person.getRelativeUrl() not in webpage.getFollowUpList():\n
value_list = webpage.getFollowUpValueList()\n
follow_up_list = web_page.getFollowUpList()\n
if person.getRelativeUrl() not in follow_up_list:\n
value_list = follow_up_list\n
value_list.append(person)\n
webpage.setFollowUpValueList(value_list)\n
web_page.setFollowUpValueList(value_list)\n
\n
return webpage\n
return web_page\n
</string> </value>
</item>
<item>
......
310
\ No newline at end of file
311
\ 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