[Zope] import error
Oliver Bleutgen
myzope@gmx.net
Mon, 16 Jun 2003 15:29:39 +0200
Michael Long wrote:
> That must be the problem. The Catalog object was created in
> "manage_afterAdd". How do I work around this issue. You will find the
> traceback below.
>
>
> * Module ZPublisher.Publish, line 98, in publish
> * Module ZPublisher.mapply, line 88, in mapply
> * Module ZPublisher.Publish, line 39, in call_object
> * Module OFS.ObjectManager, line 530, in manage_importObject
> * Module OFS.ObjectManager, line 551, in _importObjectFromFile
> * Module OFS.ObjectManager, line 272, in _setObject
> * Module OFS.ObjectManager, line 280, in manage_afterAdd
> * Module Products.PRealEstate.PRealEstate, line 95, in
> manage_afterAdd
> * Module Products.PRealEstate.PTools, line 25, in setupCatalog
> * Module Products.ZCatalog.ZCatalog, line 53, in
> manage_addZCatalog
> * Module OFS.ObjectManager, line 244, in _setObject
> * Module OFS.ObjectManager, line 77, in checkValidId
I haven't tried this, but I think this should work.
Just change the sourcecode of PRealEstate.PRealEstate.manage_afterAdd
and add something like
if not 'Catalog' in self.ObjectIds():
as a condition before the catalog is added there.
Or a try/except clause ...
cheers,
oliver