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):
delivery_value = self.getDeliveryValue()
if delivery_value is None:
# If the parent is not an Applied Rule, self does not have the method.
if getattr(self, 'getRootAppliedRule', None) is not None:
ra = self.getRootAppliedRule()
else:
getRootAppliedRule = getattr(self, 'getRootAppliedRule', None)
if getRootAppliedRule is None:
return None
ra = getRootAppliedRule()
order = ra.getCausalityValue()
if order is not None:
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