Commit f5a0bb76 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

if causality state is still draft, we don't need to call diverge() or solve()...

if causality state is still draft, we don't need to call diverge() or solve() and it causes an exception if called.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@35629 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 93a97564
......@@ -375,8 +375,10 @@ class Delivery(XMLObject, ImmobilisationDelivery, CompositionMixin):
deliver is convergent, and if so it will put the delivery
in a solved state, if not convergent in a diverged state
"""
if getattr(self, 'diverge', None) is not None \
and getattr(self, 'converge', None) is not None:
isTransitionPossible = \
self.getPortalObject().portal_workflow.isTransitionPossible
if isTransitionPossible(self, 'diverge') and \
isTransitionPossible(self, 'converge'):
if self.isDivergent(**kw):
self.diverge()
else:
......
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