From 365129f25b152fff83884e59257b33cc3424580e Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Wed, 3 Feb 2010 06:55:02 +0000 Subject: [PATCH] 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 --- product/ERP5/Document/Resource.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/product/ERP5/Document/Resource.py b/product/ERP5/Document/Resource.py index 9b98baf18a..c4b6bfc2bb 100644 --- a/product/ERP5/Document/Resource.py +++ b/product/ERP5/Document/Resource.py @@ -869,6 +869,8 @@ class Resource(XMLMatrix, Variated): global_definition_dict = self.\ QuantityUnitConversionModule_getUniversalDefinitionDict() + # _getUniversalDefinitionDict is a cached function. Copy the object to + # avoid modifying it result = global_definition_dict.copy() for definition_group in self.objectValues(portal_type= \ 'Quantity Unit Conversion Group'): -- 2.30.9