From 99a32346c77299a84554e5d74b4ec6c370e2f6c4 Mon Sep 17 00:00:00 2001 From: Arnaud Fontaine <arnaud.fontaine@nexedi.com> Date: Tue, 15 Feb 2011 14:22:40 +0000 Subject: [PATCH] Followup to r43353 git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43354 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Accessor/AcquiredProperty.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/product/ERP5Type/Accessor/AcquiredProperty.py b/product/ERP5Type/Accessor/AcquiredProperty.py index ff9d5fdc4b..74b9cf4e2b 100644 --- a/product/ERP5Type/Accessor/AcquiredProperty.py +++ b/product/ERP5Type/Accessor/AcquiredProperty.py @@ -65,6 +65,16 @@ class Getter(BaseGetter): self._property_type = property_type self._portal_type = portal_type self._null = type_definition[property_type]['null'] + + # These values are hashed by _get*AcquiredProperty: to be + # hashable, they need to be converted to tuples + if isinstance(acquisition_base_category, list): + acquisition_base_category = tuple(acquisition_base_category) + if isinstance(acquisition_portal_type, list): + acquisition_portal_type = tuple(acquisition_portal_type) + if isinstance(acquisition_object_id, list): + acquisition_object_id = tuple(acquisition_object_id) + self._acquisition_base_category = acquisition_base_category self._acquisition_portal_type = acquisition_portal_type self._acquisition_accessor_id = acquisition_accessor_id @@ -142,6 +152,16 @@ class Setter(BaseSetter): self._property_type = property_type self._portal_type = portal_type self._null = type_definition[property_type]['null'] + + # These values are hashed by _get*AcquiredProperty: to be + # hashable, they need to be converted to tuples + if isinstance(acquisition_base_category, list): + acquisition_base_category = tuple(acquisition_base_category) + if isinstance(acquisition_portal_type, list): + acquisition_portal_type = tuple(acquisition_portal_type) + if isinstance(acquisition_object_id, list): + acquisition_object_id = tuple(acquisition_object_id) + self._acquisition_base_category = acquisition_base_category self._acquisition_portal_type = acquisition_portal_type self._acquisition_accessor_id = acquisition_accessor_id -- 2.30.9