Commit 1afbee91 authored by Julien Muchembled's avatar Julien Muchembled

Fix ActiveObject.getActiveProcess

parent 1ea46dd1
...@@ -161,10 +161,9 @@ class ActiveObject(ExtensionClass.Base): ...@@ -161,10 +161,9 @@ class ActiveObject(ExtensionClass.Base):
return self.hasActivity(processing_node = VALIDATE_ERROR_STATE) return self.hasActivity(processing_node = VALIDATE_ERROR_STATE)
def getActiveProcess(self): def getActiveProcess(self):
activity_tool = getToolByName(self.getPortalObject(), 'portal_activities', None) path = getActivityRuntimeEnvironment()._message.active_process
if activity_tool is None: if active_process:
return None # Do nothing if no portal_activities return self.unrestrictedTraverse(path)
return activity_tool.getActiveProcess()
def setDefaultActivateParameters(self, placeless=False, **kw): def setDefaultActivateParameters(self, placeless=False, **kw):
# This method sets the default keyword parameters to activate. This is # This method sets the default keyword parameters to activate. This is
......
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