Commit 786ae565 authored by Jérome Perrin's avatar Jérome Perrin

Also report errors if proxy listbox id is not a listbox

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30073 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63a42bb1
...@@ -75,7 +75,10 @@ for field_path, field in context.ZopeFind(\n ...@@ -75,7 +75,10 @@ for field_path, field in context.ZopeFind(\n
for path, name in field.get_value(\'proxy_listbox_ids\'):\n for path, name in field.get_value(\'proxy_listbox_ids\'):\n
if context.restrictedTraverse(path, None) is None:\n if context.restrictedTraverse(path, None) is None:\n
print \' PROBLEM: field %s uses an invalid form for %s: %s\' % (field_path, name, path)\n print \' PROBLEM: field %s uses an invalid form for %s: %s\' % (field_path, name, path)\n
\n else:\n
proxy_listbox = context.restrictedTraverse(path)\n
if proxy_listbox.meta_type not in (\'ProxyField\', \'ListBox\'):\n
print \' PROBLEM: field %s uses an invalid proxy with %s meta_type\' % (field_path, proxy_listbox.meta_type)\n
return printed\n return printed\n
</string> </value> </string> </value>
</item> </item>
...@@ -126,6 +129,7 @@ return printed\n ...@@ -126,6 +129,7 @@ return printed\n
<string>form</string> <string>form</string>
<string>path</string> <string>path</string>
<string>name</string> <string>name</string>
<string>proxy_listbox</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
516 518
\ 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