[Zope-dev] Re: [Zope-Checkins] SVN:
Zope/branches/Zope-2_8-branch/ fix #2235 for real now
Leonardo Rochael Almeida
leo at enfoldsystems.com
Fri Nov 17 08:49:31 EST 2006
Em Sex, 2006-11-17 às 07:48 +0000, Chris Withers escreveu:
> Leonardo Rochael Almeida wrote:
> [....]
>
> > This is the full method before my changes:
> >
> > def getobject(self, rid, REQUEST=None):
> > """Return a cataloged object given a 'data_record_id_'
> > """
> > obj = self.aq_parent.unrestrictedTraverse(self.getpath(rid))
> > if not obj:
> > if REQUEST is None:
> > REQUEST=self.REQUEST
> > obj = self.resolve_url(self.getpath(rid), REQUEST)
> > return obj
>
> [...]
>
> > A) Keep my changes, but use a marker "object()" instead of None for the
> > "default" parameter of the .unrestrictedTraverse() call.
> >
> > B) Reverse my changes, but also remove the "if not obj" block, which is
> > buggy whichever way you look at it with the old unrestrictedTraverse
> > call.
> >
> > Which one should it be?
>
> I'd go for B.
If no one else chimes in today, I'll implement B.
ZCatalog .getobject(rid) call will simply call unrestrictedTraverse,
ignoring the REQUEST. parameter. I'll add a deprecation warning on the
trunk if the REQUEST parameter is passed in.
Cheers, Leo
--
Leonardo Rochael Almeida
Enfold Systems
http://www.enfoldsystems.com
phone. +1.713.942.2377 Ext 215
fax. +1.832.201.8856
More information about the Zope-Dev
mailing list