Commit 365129f2 authored by Nicolas Dumazet's avatar Nicolas Dumazet

comment why one should not try to modify the returned dict in place


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32200 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b2f7e979
...@@ -869,6 +869,8 @@ class Resource(XMLMatrix, Variated): ...@@ -869,6 +869,8 @@ class Resource(XMLMatrix, Variated):
global_definition_dict = self.\ global_definition_dict = self.\
QuantityUnitConversionModule_getUniversalDefinitionDict() QuantityUnitConversionModule_getUniversalDefinitionDict()
# _getUniversalDefinitionDict is a cached function. Copy the object to
# avoid modifying it
result = global_definition_dict.copy() result = global_definition_dict.copy()
for definition_group in self.objectValues(portal_type= \ for definition_group in self.objectValues(portal_type= \
'Quantity Unit Conversion Group'): 'Quantity Unit Conversion Group'):
......
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