Commit ffc3d8e2 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

try to use recorded property value if exists in explain().


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30660 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c0f5a98c
...@@ -94,7 +94,12 @@ class FloatDivergenceTester(Predicate): ...@@ -94,7 +94,12 @@ class FloatDivergenceTester(Predicate):
tested_property = self.getTestedProperty() tested_property = self.getTestedProperty()
delivery_mvt = simulation_movement.getDeliveryValue() delivery_mvt = simulation_movement.getDeliveryValue()
delivery_mvt_property = delivery_mvt.getProperty(tested_property) delivery_mvt_property = delivery_mvt.getProperty(tested_property)
simulation_mvt_property = simulation_movement.getProperty(tested_property) if simulation_movement.isPropertyRecorded(tested_property):
simulation_mvt_property = simulation_movement.getRecordedProperty(tested_property)
if isinstance(simulation_mvt_property, (list, tuple)):
simulation_mvt_property = simulation_mvt_property[0]
else:
simulation_mvt_property = simulation_movement.getProperty(tested_property)
def getErrorMessage(message, mapping): def getErrorMessage(message, mapping):
return DivergenceMessage( return DivergenceMessage(
......
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