Commit 963e0667 authored by Jérome Perrin's avatar Jérome Perrin

dont' fail if an organisation does not have a group

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34936 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1acaa3cb
......@@ -81,13 +81,14 @@ if organisation:\n
# else we lookup in parent organisations\n
if not bank_account_list:\n
group_value = organisation_value.getGroupValue(None)\n
uid_list = []\n
while group_value.getPortalType() != \'Base Category\':\n
uid_list.append(group_value.getUid())\n
group_value = group_value.getParentValue()\n
search_kw[\'parent_strict_group_uid\'] = uid_list\n
search_kw[\'parent_portal_type\'] = \'Organisation\'\n
bank_account_list = portal.portal_catalog(**search_kw)\n
if group_value is not None:\n
uid_list = []\n
while group_value.getPortalType() != \'Base Category\':\n
uid_list.append(group_value.getUid())\n
group_value = group_value.getParentValue()\n
search_kw[\'parent_strict_group_uid\'] = uid_list\n
search_kw[\'parent_portal_type\'] = \'Organisation\'\n
bank_account_list = portal.portal_catalog(**search_kw)\n
\n
else:\n
if section_category is None:\n
......
1195
\ No newline at end of file
1198
\ 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