Commit d7b173f9 authored by Vincent Pelletier's avatar Vincent Pelletier

Small coding style improvement: multiple statements belong to multiple lines.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29674 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ab0ae9d6
...@@ -117,7 +117,8 @@ class ActiveObject(ExtensionClass.Base): ...@@ -117,7 +117,8 @@ class ActiveObject(ExtensionClass.Base):
active_process = portal.unrestrictedTraverse(active_process) active_process = portal.unrestrictedTraverse(active_process)
activity_tool = getattr(portal, 'portal_activities', None) activity_tool = getattr(portal, 'portal_activities', None)
if activity_tool is None: return self # Do nothing if no portal_activities if activity_tool is None:
return self # Do nothing if no portal_activities
# activate returns an ActiveWrapper # activate returns an ActiveWrapper
# a queue can be provided as well as extra parameters # a queue can be provided as well as extra parameters
# which can be used for example to define deferred tasks # which can be used for example to define deferred tasks
...@@ -126,7 +127,8 @@ class ActiveObject(ExtensionClass.Base): ...@@ -126,7 +127,8 @@ class ActiveObject(ExtensionClass.Base):
security.declareProtected( permissions.ModifyPortalContent, 'flushActivity' ) security.declareProtected( permissions.ModifyPortalContent, 'flushActivity' )
def flushActivity(self, invoke=0, **kw): def flushActivity(self, invoke=0, **kw):
activity_tool = getToolByName(self, 'portal_activities', None) activity_tool = getToolByName(self, 'portal_activities', None)
if activity_tool is None: return # Do nothing if no portal_activities if activity_tool is None:
return # Do nothing if no portal_activities
# flush all activities related to this object # flush all activities related to this object
activity_tool.flush(self, invoke=invoke, **kw) activity_tool.flush(self, invoke=invoke, **kw)
...@@ -164,7 +166,8 @@ class ActiveObject(ExtensionClass.Base): ...@@ -164,7 +166,8 @@ class ActiveObject(ExtensionClass.Base):
security.declareProtected( permissions.View, 'getActiveProcess' ) security.declareProtected( permissions.View, 'getActiveProcess' )
def getActiveProcess(self): def getActiveProcess(self):
activity_tool = getToolByName(self, 'portal_activities', None) activity_tool = getToolByName(self, 'portal_activities', None)
if activity_tool is None: return None # Do nothing if no portal_activities if activity_tool is None:
return None # Do nothing if no portal_activities
return activity_tool.getActiveProcess() return activity_tool.getActiveProcess()
security.declareProtected(permissions.ModifyPortalContent, security.declareProtected(permissions.ModifyPortalContent,
......
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