Commit 884c5b1e authored by Aurel's avatar Aurel

reindex object when calling workflow method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15885 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 02fb7d36
...@@ -166,11 +166,14 @@ class WorkflowMethod(Method): ...@@ -166,11 +166,14 @@ class WorkflowMethod(Method):
except ObjectMoved, ex: except ObjectMoved, ex:
# Re-raise with a different result. # Re-raise with a different result.
raise ObjectMoved(ex.getNewObject(), result) raise ObjectMoved(ex.getNewObject(), result)
else:
if getattr(aq_base(instance), 'reindexObject', None) is not None:
instance.reindexObject()
# Call whatever must be called after changing states # Call whatever must be called after changing states
for wf_id, transition_list in candidate_transition_item_list: for wf_id, transition_list in candidate_transition_item_list:
wf[wf_id].notifySuccess(instance, self._id, result, args=args, kw=kw, transition_list=transition_list) wf[wf_id].notifySuccess(instance, self._id, result, args=args, kw=kw, transition_list=transition_list)
# Return result finally # Return result finally
return result return result
......
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