[Zope-CMF] using review_history and proxy roles to get published date

Travis N. Vaught travis at enthought.com
Fri Jan 23 07:25:18 EST 2004


Is it possible to use proxy roles in a python script like this:

(result_obj is passed in...)

review_history = container.portal_workflow.getInfoFor(result_obj, 
'review_history');

last_published_review = [review for review in review_history if 
review.get('action','')=='publish'];

last_published_date = 
context.toPortalTime(last_published_review[0]['time'], long_format=1)

return last_published_date

I'm trying to get a published date from the cmf document.  It works 
great for owners and reviewers, but hands back...

Error Details
Error Type
WorkflowException
Error Value
Could not get info: review_history

...for 'members.'

I've got a proxy role of reviewer set on the script.  Am I wrong in 
trying this approach?

Thanks in advance,

Travis





More information about the Zope-CMF mailing list