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

Roel Van den Bergh roel@planetinterior.com
Thu, 4 Apr 2002 09:48:17 +0200


Tnx for the correction. Now I don't get any errors anymore.
But the files aren't published either.

> -----Oorspronkelijk bericht-----
> Van: Jeffrey P Shell [mailto:jeffrey@cuemedia.com]
> Verzonden: donderdag 4 april 2002 5:25
> Aan: roel@planetinterior.com; zope-cmf
> Onderwerp: Re: [Zope-CMF] Workflow - Publish All Objects in Folder
> 
> 
> 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
> 
> 
>