[Zope] Seing if an attribute exist in an ObjectManager

Max Møller Rasmussen maxm@normik.dk
Tue, 29 May 2001 14:28:01 +0200


I have set an image in an ObjectManager object like this:

    imID = 'laeringsGraf'    
    self._setObject(imID, OFS.Image.Image(imID,'Lærings graf',''))
    self._getOb(imID).update_data(data)

I only want to draw it if it isn't there allready

How do I then check if it allready exists?
I guess it's something like::

    if not hasattr(self, imID): ??
    or
    if not self._has_attr(imID)

regarsd Max M