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): ...@@ -334,9 +334,7 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
def isOrderable(self): def isOrderable(self):
applied_rule = self.getParentValue() applied_rule = self.getParentValue()
rule = applied_rule.getSpecialiseValue() rule = applied_rule.getSpecialiseValue()
if rule is not None: return rule is not None and rule.isOrderable(self)
return rule.isOrderable(self)
return 0
getOrderable = isOrderable getOrderable = isOrderable
...@@ -345,19 +343,14 @@ class SimulationMovement(Movement, PropertyRecordableMixin): ...@@ -345,19 +343,14 @@ class SimulationMovement(Movement, PropertyRecordableMixin):
def isDeliverable(self): def isDeliverable(self):
applied_rule = self.getParentValue() applied_rule = self.getParentValue()
rule = applied_rule.getSpecialiseValue() rule = applied_rule.getSpecialiseValue()
if rule is not None: return rule is not None and rule.isDeliverable(self)
return rule.isDeliverable(self)
return 0
getDeliverable = isDeliverable getDeliverable = isDeliverable
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'isDeletable') 'isDeletable')
def isDeletable(self): def isDeletable(self):
if not self.isFrozen() and not self._isTreeDelivered(): return not self.isFrozen() and not self._isTreeDelivered()
return True
else:
return False
# Simulation Dates - acquire target dates # Simulation Dates - acquire target dates
security.declareProtected( Permissions.AccessContentsInformation, 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