Commit da6d2ab9 authored by Julien Muchembled's avatar Julien Muchembled

small optimization (getattr only once)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41610 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5aedd046
...@@ -313,10 +313,10 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin): ...@@ -313,10 +313,10 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
delivery_value = self.getDeliveryValue() delivery_value = self.getDeliveryValue()
if delivery_value is None: if delivery_value is None:
# If the parent is not an Applied Rule, self does not have the method. # If the parent is not an Applied Rule, self does not have the method.
if getattr(self, 'getRootAppliedRule', None) is not None: getRootAppliedRule = getattr(self, 'getRootAppliedRule', None)
ra = self.getRootAppliedRule() if getRootAppliedRule is None:
else:
return None return None
ra = getRootAppliedRule()
order = ra.getCausalityValue() order = ra.getCausalityValue()
if order is not None: if order is not None:
return order return order
......
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