Commit 3e39b332 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

now getRecordedPropertyValue() will return a single value or multiple values appropriately.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31052 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 45c1b588
No related merge requests found
......@@ -92,8 +92,6 @@ class CategoryMembershipDivergenceTester(Predicate, DivergenceTesterMixin):
tested_property = self.getTestedProperty()
if prevision_movement.isPropertyRecorded(tested_property):
prevision_value = prevision_movement.getRecordedProperty(tested_property)
if not isinstance(prevision_value, (list, tuple)):
prevision_value = [prevision_value]
else:
prevision_value = prevision_movement.getPropertyList(tested_property)
return {tested_property:prevision_value}
......
......@@ -158,8 +158,6 @@ class FloatDivergenceTester(Predicate, DivergenceTesterMixin):
tested_property = self.getTestedProperty()
if prevision_movement.isPropertyRecorded(tested_property):
prevision_value = prevision_movement.getRecordedProperty(tested_property)
if isinstance(prevision_value, (list, tuple)):
prevision_value = prevision_value[0]
else:
prevision_value = prevision_movement.getProperty(tested_property)
return {tested_property:prevision_value}
......
......@@ -95,8 +95,6 @@ class StringDivergenceTester(Predicate, DivergenceTesterMixin):
tested_property = self.getTestedProperty()
if prevision_movement.isPropertyRecorded(tested_property):
prevision_value = prevision_movement.getRecordedProperty(tested_property)
if isinstance(prevision_value, (list, tuple)):
prevision_value = prevision_value[0]
else:
prevision_value = prevision_movement.getProperty(tested_property)
return {tested_property:prevision_value}
......
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