Commit 888d6fe9 authored by Jérome Perrin's avatar Jérome Perrin

- Add missing limit=None to prevent the safety limit of 1000 documents

- use default_%(base_category)s_uid related key, because %(base_category)s
  fails for some base categories, for example source_uid cannot be mapped and
  is a catalog error.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31583 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4085056b
...@@ -63,7 +63,10 @@ for base_cat_id in context.REQUEST[\'category_list\']:\n ...@@ -63,7 +63,10 @@ for base_cat_id in context.REQUEST[\'category_list\']:\n
d[\'cat_list\'] = cat_list = []\n d[\'cat_list\'] = cat_list = []\n
d[\'max_cat_depth\'] = max_cat_depth = 0\n d[\'max_cat_depth\'] = max_cat_depth = 0\n
cat_info_list.append(d)\n cat_info_list.append(d)\n
for cat in context.portal_catalog(portal_type=\'Category\', sort_on=((\'path\', \'accending\'),), **{\'%s_uid\' % (base_cat.getId(),): base_cat.getUid()}):\n for cat in context.portal_catalog(portal_type=\'Category\',\n
sort_on=((\'path\', \'ascending\'),),\n
limit=None,\n
**{\'default_%s_uid\' % (base_cat.getId(),): base_cat.getUid()}):\n
d[\'cat_list\'].append(cat)\n d[\'cat_list\'].append(cat)\n
cat_depth = len(cat.getRelativeUrl().split(\'/\'))\n cat_depth = len(cat.getRelativeUrl().split(\'/\'))\n
if cat_depth > d[\'max_cat_depth\']:\n if cat_depth > d[\'max_cat_depth\']:\n
...@@ -150,6 +153,7 @@ return result\n ...@@ -150,6 +153,7 @@ return result\n
<string>cat_list</string> <string>cat_list</string>
<string>max_cat_depth</string> <string>max_cat_depth</string>
<string>_apply_</string> <string>_apply_</string>
<string>None</string>
<string>cat</string> <string>cat</string>
<string>len</string> <string>len</string>
<string>cat_depth</string> <string>cat_depth</string>
......
1414 1415
\ 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