Extra step: contentValues

Posted by Maurits van Rees at Jun 05, 2007 12:41 PM
This is an issue not specific for Plone but for CMF, but as CMFCore.permissions is also mentioned as a step here, this is probably fine.

contentValues('my portal type') should be changed to contentValues(filter={'portal_type': 'my portal type'})

Otherwise you get an error. The above code works on Plone 2.5 and 3.0.

Okay, this might get messed up when submitting, but here is a traceback:

  File "/home/maurits/instances/xm/Products/eXtremeManagement/content/Iteration.py", line 77, in startable
    stories = self.contentValues('Story')
  File "/home/maurits/instances/poi3/Products/CMFCore/PortalFolder.py", line 203, in contentValues
    return [ item[1] for item in self.contentItems(filter) ]
  File "/home/maurits/instances/poi3/Products/CMFCore/PortalFolder.py", line 189, in contentItems
    return self._filteredItems(ids, filter)
  File "/home/maurits/instances/poi3/Products/CMFCore/PortalFolder.py", line 154, in _filteredItems
    filt = filt.copy()
AttributeError: 'str' object has no attribute 'copy'

Example changeset

Posted by Maurits van Rees at Jun 05, 2007 12:43 PM