Commit 45c1d70b authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type.Base: Remove setDescription.

Documents should inherit from XMLObject, which already overloads this
setter. As a result, this method is normally not used.
The problem is that it gets called when calling
  newTempBase(
    description='foo'
  )
which fails with:
  AttributeError: _setDescription
because _setProperty finds setDescription and tries to call it, instead
of setting description as a local property..
parent 402115d5
...@@ -759,16 +759,6 @@ class Base( CopyContainer, ...@@ -759,16 +759,6 @@ class Base( CopyContainer,
self._setTitle(value) self._setTitle(value)
self.reindexObject() self.reindexObject()
security.declareProtected( Permissions.ModifyPortalContent, 'setDescription' )
def setDescription(self, value):
"""
Set the description and reindex.
Overrides CMFCore/PortalFolder.py implementation, which does not reindex
and is guarded by inappropriate security check.
"""
self._setDescription(value)
self.reindexObject()
security.declarePublic('provides') security.declarePublic('provides')
def provides(cls, interface_name): def provides(cls, interface_name):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment