Commit 2d71669c authored by Nicolas Delaby's avatar Nicolas Delaby

I miss one optimisation here.

Use _getOb instead of getattr twice.
Thanks Julien for the tips


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33643 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f82a2cac
...@@ -448,10 +448,8 @@ class ProxyField(ZMIField): ...@@ -448,10 +448,8 @@ 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')
proxy_field = getattr(aq_base(proxy_form), field_id, None) proxy_field = proxy_form._getOb(field_id, None)
if proxy_field is not None: if proxy_field is None:
proxy_field = getattr(proxy_form, field_id)
else:
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
# priority. # priority.
......
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