[Zope] Inconsistent _object contents

Dieter Maurer dieter at handshake.de
Mon Dec 29 13:39:27 EST 2003


Michael Long wrote at 2003-12-28 14:17 -0500:
>Sorry for the incomplete posting. I hit the wrong hotkey :(
>
>I have a product with an folderish object. When examining the contents of the
>_objects attribute I see the following behavior when calling the following function
>through the ZMI.
>
>def test(self):
>  """ """
>  return self._objects
>
>No items ==> nothing returned
>1 *Folder* item ==> ({'meta_type': 'Folder', 'id': 'Folder'},)
>
>2 *Folder* items ==> {'meta_type': 'Folder', 'id': 'folder1'}
>
>3 *Folder* items ==> ({meta_type': 'Folder', 'id': 'Folder'}, {'meta_type':
>'Folder', 'id': 'folder2'})
>
>Is this correct behavior?

ZPublisher treats tuples with 2 elements in a special way
(using part as title and part as body).

Avoid such tuples...

-- 
Dieter



More information about the Zope mailing list