PATCH: Re: [Zope] Object history: need last editor

Michael S. Fischer michael@dynamine.net
Fri, 16 Aug 2002 00:45:27 -0700


On Thu, Aug 15, 2002 at 11:51:51PM -0700, Andy McKay wrote:

> You could call undoable transactions. Here's how to do it as a Script
> (Python) where "Test" is the object:
> 
> obj = context.Test
> t = obj.undoable_transactions()
> if t: print t[0]['user_name']
> else: print "Unknown"
> return printed

The trouble with undoable_transactions() is that if you ever compact the
database, the function returns Unknown.

Querying the history is, I think, more robust.

-- 
Michael S. Fischer / michael at dynamine.net / +1 650-533-4684
Lead Hacketeer, Dynamine Consulting, Silicon Valley, CA