Commit 4a9712b0 authored by Nicolas Delaby's avatar Nicolas Delaby

Here we avoid calling field.get_recursive_orig_value

on all fields because it can be acquired from another
field in context. ie, from a listbox field.
AttributeError is not raised and get_recursive_orig_value
does not exists neither on that field.
So, test condition on meta_type attribute to avoid non desirable side effects.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33899 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4e6c6d8b
......@@ -202,9 +202,14 @@ class TALESValue(StaticValue):
'Field.get_value ( %s/%s [%s]), exception on tales_expr: ' %
( form.getId(), field.getId(), id), error=sys.exc_info())
# field may be ProxyField
try:
# here we avoid calling field.get_recursive_orig_value
# on all fields because it can be acquired from another
# field in context. ie, from a listbox field.
# So, test condition on meta_type attribute to avoid
# non desirable side effects.
if field.meta_type == 'ProxyField':
value = field.get_recursive_orig_value(id)
except AttributeError:
else:
value = field.get_orig_value(id)
return self.returnValue(field, id, value)
......
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