Skip to content

Commit

Permalink
Added doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
sgeulette committed May 24, 2022
1 parent 5bb55a1 commit e165105
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions Extensions/corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,16 @@ def add_md5(self, change=''):


def do_transition(self, typ='dmsincomingmail', transition='close_manager', criteria="{}", limit=5000, change=''):
""" Apply a transition to many objects """
""" Apply a transition to objects found following criterias.
:param self: portal is the best
:param typ: portal_type searched
:param transition: transition to apply
:param criteria: criteria string that will be evaluated
:param limit: maximum objects handled
:param change: must be to 1 to apply changes
:return: messages string
"""
if not check_zope_admin():
return "You must be a zope manager to run this script"
from Products.CMFCore.WorkflowCore import WorkflowException
Expand Down Expand Up @@ -179,8 +188,15 @@ def do_transition(self, typ='dmsincomingmail', transition='close_manager', crite


def set_state(self, typ='dmsincomingmail', state='closed', criteria="{}", limit=5000, change=''):
"""Set state on many objects.
"""Set state on objects found following criterias.
:param self: portal is the best
:param typ: portal_type searched
:param state: destination state
:param criteria: criteria string that will be evaluated
:param limit: maximum objects handled
:param change: must be to 1 to apply changes
:return: messages string
"""
if not check_zope_admin():
return "You must be a zope manager to run this script"
Expand Down

0 comments on commit e165105

Please sign in to comment.