Commit bde816c8 authored by Jérome Perrin's avatar Jérome Perrin

return True / False instead of 1 / 0


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44383 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 72fce596
......@@ -480,9 +480,9 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
'isConvergent')
def isConvergent(self):
"""
Returns 0 if the target is not met
Returns true if movement is not divergent
"""
return int(not self.isDivergent())
return bool(not self.isDivergent())
security.declareProtected( Permissions.AccessContentsInformation,
'isDivergent')
......@@ -497,8 +497,8 @@ class Movement(XMLObject, Amount, CompositionMixin, AmountGeneratorMixin):
"""
for simulation_movement in self.getDeliveryRelatedValueList():
if simulation_movement.isDivergent():
return 1
return 0
return True
return False
def getDivergenceList(self):
"""
......
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