Commit d61ad945 authored by Yusei Tahara's avatar Yusei Tahara

Display useful error message if target proxy of field does not exist.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16316 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9351d3c4
......@@ -780,7 +780,10 @@ class ERP5Form(ZMIForm, ZopePageTemplate):
# utility function
def get_field_meta_type_and_proxy_flag(field):
if field.meta_type=='ProxyField':
return field.getRecursiveTemplateField().meta_type, True
try:
return field.getRecursiveTemplateField().meta_type, True
except AttributeError:
raise AttributeError, 'The proxy target of %s field does not exists. Please check the field setting.' % field.getId()
else:
return field.meta_type, False
......
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