[Zope-CMF] Workflow - Publish All Objects in Folder

Jeffrey P Shell jeffrey@cuemedia.com
Wed, 03 Apr 2002 20:25:15 -0700


On 4/3/02 12:28 AM, "Roel Van den Bergh" <roel@planetinterior.com> wrote:

> After running the following script under winZope 2.5.0 and CMF 1.2 with CMF
> Workflow Revision 2 (Submitted by: runyaga & Last Edited: 2002-02-27, found
> on ZopeLabs)
> 
> #create (Python) Script called, publish_all
> wf_tool=context.portal_workflow
> 
> print 'go go auto-publish'
> for o in context.contentValues():
>   try:
>       wf_tool.doActionFor(o, 'publish')
>   except:
>       print o.objectId() + ' didnt publish '
> 
> return printed
> 
> I get the following error:
> 
> Error Type: AttributeError
> Error Value: objectId

I think that's supposed to be

  print o.getId() + " didn't publish"
          ^^^^^

-- 
Jeffrey P Shell 
www.cuemedia.com