Commit fc65b11f authored by Romain Courteaud's avatar Romain Courteaud

ERP5Form/ProxyField: do not fail if the proxy_form is not an ERP5Form

parent 3444caa5
...@@ -434,7 +434,12 @@ class ProxyField(ZMIField): ...@@ -434,7 +434,12 @@ class ProxyField(ZMIField):
if (proxy_form is not None): if (proxy_form is not None):
field_id = self.get_value('field_id') field_id = self.get_value('field_id')
try:
proxy_field = proxy_form._getOb(field_id, None) proxy_field = proxy_form._getOb(field_id, None)
except AttributeError:
# If the proxy_form is not an ERP5 Form, but a Page Template,
# accessing _getOb method fails
proxy_field = None
if proxy_field is None: if proxy_field is None:
if form_id_with_skin_folder_name_flag is False: if form_id_with_skin_folder_name_flag is False:
# Try to get the field from another field library with a lower # Try to get the field from another field library with a lower
......
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