def workflow_put_listener(sender, obj=None, src=None, service=None): handle_workflow_modify(sender, obj, src, service) if not inspect(obj).attrs.status.history.has_changes(): return new = inspect(obj).attrs.status.history.added[0] old = inspect(obj).attrs.status.history.deleted[-1] # first activate wf if (old, new) == (obj.DRAFT, obj.ACTIVE) and obj.cycles: handle_cycle_created(obj.cycles[0], False)
def cycle_post_listener(sender, obj=None, src=None, service=None): handle_cycle_created(sender, obj, src, service, True)
def cycle_post_listener(sender, obj=None, src=None, service=None): handle_cycle_created(obj, True)