[Zope-CMF] Another portal caatalog wierdness???
Chris Withers
chrisw@nipltd.com
Thu, 08 May 2003 16:21:15 +0100
Braun Brelin wrote:
> Something else I've noticed. I have a test script that looks like this:
> foo = context.portal_catalog(id='mydoc')
> if (foo is None):
this is wrong.
a non-matching search returns an empty list, not None, change it to:
if not foo:
> print "No objects found"
> else:
> for res in foo:
> print res.id
This is also incorrect.
Try:
print res.getObject().getId()
...or ad 'id' as a metadata column to portal_catalog.
cheers,
Chris