Commit c18fd491 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Julien Muchembled

cast the recorded value to list in CategoryMembershipEquivalenceTester.

This reapplies commit 648d7020
parent 7a44f695
...@@ -68,6 +68,14 @@ class CategoryMembershipEquivalenceTester(Predicate, EquivalenceTesterMixin): ...@@ -68,6 +68,14 @@ class CategoryMembershipEquivalenceTester(Predicate, EquivalenceTesterMixin):
if getattr(decision_movement, 'isPropertyRecorded', if getattr(decision_movement, 'isPropertyRecorded',
lambda x:False)(tested_property): lambda x:False)(tested_property):
decision_value = decision_movement.getRecordedProperty(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: else:
decision_value = self._getTestedPropertyValue(decision_movement, decision_value = self._getTestedPropertyValue(decision_movement,
tested_property) tested_property)
......
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