Thanks for the answers, indeed the problem "was" outside the code.
Thanks to all the community!!
and to [Alexis, Chris, Dieter, -aj(Andreas Jung),
Y. (Yuri)]
Leticia
-----Original Message-----
From: "SER.RI-TIC-Alexis
Roda" <alexis.roda@urv.net>
To: Leticia Larrosa
<LETICIA@tesla.cujae.edu.cu>
Date: Thu, 24 Mar 2005 09:49:38
+0100
Subject: Re: [Zope] manage_delObjects()
> Leticia Larrosa
wrote:
> > Thanks for all the answer but I try, for example
whit:
> >
> > folderToDelete = 'toDelete'
> >
container.manage_delObjects([folderToDelete])
> >
> >
#or
> >
> >
container.manage_delObjects([container[folderToDelete].getId()])
>
>
> > and get the following error in both cases:
> >
Error Type: KeyError
> > Error Value: toDelete
>
>
Seems like the object you're trying to delete don't exists (inside
>
container). In order to check this add (just before the
>
container.manage_delObjects()) something like:
>
> raise
'debug', container.objectIds()
>
> or
>
> raise
'debug', container.absolute_url()
>
> just to ensure that
container is really what it should be and
> 'toDelete'
> is a
subitem.
>
>
> HTH
> --
>
////
>
(@ @)
>
----------------------------oOO----(_)----OOo--------------------------
> <> Ojo por ojo y
el mundo acabara ciego
> /\ Alexis Roda - Universitat Rovira i Virgili
- Reus, Tarragona (Spain)
>
-----------------------------------------------------------------------
>
>
>