Commit c3798b5f authored by Vincent Pelletier's avatar Vincent Pelletier

ERP5Type.Base: Tolerate _baseGetTitle absence.

Although it should never happen in normal use, it may happen during an
upgrade when property sheets fail creating accessors (ex: broken object
because portal type moved to a different Business Template).
parent 2677d091
...@@ -2366,9 +2366,7 @@ class Base( CopyContainer, ...@@ -2366,9 +2366,7 @@ class Base( CopyContainer,
r = self.getShortTitle() r = self.getShortTitle()
if r: return r if r: return r
return (self.getProperty('reference') or return (self.getProperty('reference') or
# No need to test existence since all Base instances have this method getattr(self, '_baseGetTitle', str)() or
# Also useful whenever title is calculated
self._baseGetTitle() or
self.getId()) self.getId())
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
......
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