diff --git a/product/ERP5/Document/CategoryMembershipEquivalenceTester.py b/product/ERP5/Document/CategoryMembershipEquivalenceTester.py index 903b07e11e7a5c409e7d9d450e2365a3991c3ec1..cf071f74f41cd7363a5b851ef1ff189d27c656c0 100644 --- a/product/ERP5/Document/CategoryMembershipEquivalenceTester.py +++ b/product/ERP5/Document/CategoryMembershipEquivalenceTester.py @@ -68,6 +68,14 @@ class CategoryMembershipEquivalenceTester(Predicate, EquivalenceTesterMixin): if getattr(decision_movement, 'isPropertyRecorded', lambda x:False)(tested_property): decision_value = decision_movement.getRecordedProperty(tested_property) + # The following may be only for compatibility. Although current code does + # not seem to produce non-list values here, we really have existing data + # with such values, e.g. aggregate=None. + if not isinstance(decision_value, (list, tuple)): + if decision_value is None: + decision_value = [] + else: + decision_value = [decision_value] else: decision_value = self._getTestedPropertyValue(decision_movement, tested_property)