Commit acaee214 authored by Vincent Pelletier's avatar Vincent Pelletier

Avoid the need for backward compatibility code when possible. Also, avoid...

Avoid the need for backward compatibility code when possible. Also, avoid modifying persistent objects when possible.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19182 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0123fc51
......@@ -149,6 +149,7 @@ class ProxyField(ZMIField):
widget = ProxyWidgetInstance
validator = ProxyValidatorInstance
delegated_list = tuple()
# methods screen
security.declareProtected('View management screens',
......@@ -405,16 +406,7 @@ class ProxyField(ZMIField):
Return true if we get the value from the proxied field.
No, if we surcharged the value on the proxy field.
"""
# Update old proxied field
try:
if id in self.delegated_list:
return False
else:
return True
except AttributeError:
# Update old proxied field
self.delegated_list = []
return True
return id not in self.delegated_list
security.declareProtected('Access contents information',
'get_recursive_orig_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