Commit 8738dcfa authored by Sebastien Robin's avatar Sebastien Robin

* delegate default value handling to _baseGetReference

* this indirectly fix a site error on portal_property_sheets/view
  when a property had no reference

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44209 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9026f767
...@@ -67,10 +67,10 @@ def IdAsReferenceMixin(suffix): ...@@ -67,10 +67,10 @@ def IdAsReferenceMixin(suffix):
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getReference') 'getReference')
def getReference(self, default=None): def getReference(self, *args):
id = self.id id = self.id
if id[suffix_index:] == suffix: if id[suffix_index:] == suffix:
return id[:suffix_index] return id[:suffix_index]
return self._baseGetReference(default=default) return self._baseGetReference(*args)
return IdAsReferenceMixin return IdAsReferenceMixin
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