Commit f3c847f7 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

do not raise an exception if property is not defined.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31913 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2ae30415
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from DateTime import DateTime
from Products.ERP5.Document.Predicate import Predicate from Products.ERP5.Document.Predicate import Predicate
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
...@@ -70,8 +71,8 @@ class DateTimeDivergenceTester(Predicate, DivergenceTesterMixin): ...@@ -70,8 +71,8 @@ class DateTimeDivergenceTester(Predicate, DivergenceTesterMixin):
lambda x:False)(tested_property): lambda x:False)(tested_property):
decision_value = decision_movement.getRecordedProperty(tested_property) decision_value = decision_movement.getRecordedProperty(tested_property)
else: else:
decision_value = decision_movement.getProperty(tested_property) decision_value = decision_movement.getProperty(tested_property) or DateTime(0)
prevision_value = prevision_movement.getProperty(tested_property) prevision_value = prevision_movement.getProperty(tested_property) or DateTime(0)
delta = decision_value - prevision_value delta = decision_value - prevision_value
# XXX we should use appropriate property sheets and getter methods # XXX we should use appropriate property sheets and getter methods
......
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