Commit ab9db421 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

generateHashKey should use recorded value if exists.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31436 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 042a5c99
...@@ -92,8 +92,12 @@ class CategoryMembershipDivergenceTester(Predicate, DivergenceTesterMixin): ...@@ -92,8 +92,12 @@ class CategoryMembershipDivergenceTester(Predicate, DivergenceTesterMixin):
If decision_movement is a simulation movement, use If decision_movement is a simulation movement, use
the recorded properties instead of the native ones. the recorded properties instead of the native ones.
""" """
return '%s/%s/%r' % (self.getPortalType(), self.getTestedProperty(), tested_property = self.getTestedProperty()
movement.getPropertyList(self.getTestedProperty())) if movement.isPropertyRecorded(tested_property):
value = movement.getRecordedProperty(tested_property)
else:
value = movement.getPropertyList(tested_property)
return '%s/%s/%r' % (self.getPortalType(), tested_property, value)
def getUpdatablePropertyDict(self, prevision_movement, decision_movement): def getUpdatablePropertyDict(self, prevision_movement, decision_movement):
""" """
......
...@@ -101,8 +101,11 @@ class DivergenceTesterMixin: ...@@ -101,8 +101,11 @@ class DivergenceTesterMixin:
the recorded properties instead of the native ones. the recorded properties instead of the native ones.
""" """
tested_property = self.getTestedProperty() tested_property = self.getTestedProperty()
return '%s/%s/%r' % (self.getPortalType(), tested_property, if movement.isPropertyRecorded(tested_property):
movement.getProperty(tested_property)) value = movement.getRecordedProperty(tested_property)
else:
value = movement.getProperty(tested_property)
return '%s/%s/%r' % (self.getPortalType(), tested_property, value)
def compare(self, prevision_movement, decision_movement): def compare(self, prevision_movement, decision_movement):
""" """
......
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