Commit 2561de86 authored by Bartek Górny's avatar Bartek Górny

raise exception if we want reference but there is no such Person

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11751 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 04bc8842
......@@ -104,6 +104,8 @@ for base_category in category_order:\n
res=context.portal_catalog(portal_type=\'Person\',reference=category)\n
if res is not None and len(res)==1:\n
category_object=res[0].getObject()\n
else:\n
raise Exception("no person "+category)\n
else:\n
category_object = context.portal_categories.getCategoryValue(category_path)\n
if category_object in (None, \'\'):\n
......@@ -125,6 +127,7 @@ for base_category in category_order:\n
if user_list:\n
#context.log(user_list)\n
return user_list\n
context.log(code_list)\n
r=\'_\'.join(code_list)\n
#context.log(category_order,r)\n
return r\n
......@@ -152,6 +155,14 @@ return r\n
<key> <string>_params</string> </key>
<value> <string>category_order, **kw</string> </value>
</item>
<item>
<key> <string>_proxy_roles</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
......@@ -194,6 +205,7 @@ return r\n
<string>len</string>
<string>_getitem_</string>
<string>category_object</string>
<string>Exception</string>
<string>user_name</string>
<string>category_code</string>
<string>AttributeError</string>
......
405
\ No newline at end of file
411
\ 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