Commit 664efe65 authored by Nicolas Dumazet's avatar Nicolas Dumazet

boolean simplification


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31472 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b5d98c29
......@@ -334,9 +334,7 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
def isOrderable(self):
applied_rule = self.getParentValue()
rule = applied_rule.getSpecialiseValue()
if rule is not None:
return rule.isOrderable(self)
return 0
return rule is not None and rule.isOrderable(self)
getOrderable = isOrderable
......@@ -345,19 +343,14 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
def isDeliverable(self):
applied_rule = self.getParentValue()
rule = applied_rule.getSpecialiseValue()
if rule is not None:
return rule.isDeliverable(self)
return 0
return rule is not None and rule.isDeliverable(self)
getDeliverable = isDeliverable
security.declareProtected( Permissions.AccessContentsInformation,
'isDeletable')
def isDeletable(self):
if not self.isFrozen() and not self._isTreeDelivered():
return True
else:
return False
return not self.isFrozen() and not self._isTreeDelivered()
# Simulation Dates - acquire target dates
security.declareProtected( Permissions.AccessContentsInformation,
......
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